public boolean approveTranslation ( String appid , String langCode , String key , String value ) { if ( StringUtils . isBlank ( langCode ) || key == null || value == null || getDefaultLanguageCode ( ) . equals ( langCode ) ) { return false ; } Sysprop s = dao . read ( appid , keyPrefix . concat ( langCode ) ) ; boolean create = false ; if ( s == null ) { create = true ; s = new Sysprop ( keyPrefix . concat ( langCode ) ) ; s . setAppid ( appid ) ; } s . addProperty ( key , value ) ; if ( create ) { dao . create ( appid , s ) ; } else { dao . update ( appid , s ) ; } if ( LANG_CACHE . containsKey ( langCode ) ) { LANG_CACHE . get ( langCode ) . put ( key , value ) ; } updateTranslationProgressMap ( appid , langCode , PLUS ) ; return true ; }
Approves a translation for a given language .