chore(gui): add missing ref text in untranslated messages (#2319)

fix
This commit is contained in:
Skylot
2024-10-24 17:29:30 +01:00
parent 233f8692b2
commit c0815b12bc
10 changed files with 208 additions and 183 deletions
@@ -12,7 +12,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Automatically add new i18n lines from reference (EN) into others languages
* Automatically add new i18n lines from reference (EN) into other languages
*/
public class NLSAddNewLines {
private static final Logger LOG = LoggerFactory.getLogger(NLSAddNewLines.class);
@@ -50,22 +50,25 @@ public class NLSAddNewLines {
private static void applyFix(List<String> refLines, Path path) throws IOException {
List<String> lines = Files.readAllLines(path);
int linesCount = lines.size();
if (refLines.size() <= linesCount) {
LOG.info("Skip {}, already fixed", path);
return;
}
boolean updated = false;
for (int i = 0; i < linesCount; i++) {
String line = lines.get(i);
String refLine = refLines.get(i);
if (!isSameKey(refLine, line)) {
if (isSameKey(refLine, line)) {
if (line.startsWith("#") && line.endsWith("=")) {
// add ref text if missing to simplify translation
lines.set(i, '#' + refLine);
updated = true;
}
} else {
if (refLine.isEmpty()) {
lines.add(i, "");
} else {
lines.add(i, "#" + refLine);
lines.add(i, '#' + refLine);
}
updated = true;
}
}
if (updated) {
LOG.info("Updating {}", path);
@@ -15,7 +15,7 @@ menu.navigation=Navigation
menu.text_search=Textsuche
menu.class_search=Klassen-Suche
menu.comment_search=Kommentar suchen
#menu.go_to_main_activity=
#menu.go_to_main_activity=Go to main Activity
#menu.go_to_application=Go to Application
#menu.go_to_android_manifest=Go to AndroidManifest.xml
menu.tools=Tools
@@ -26,7 +26,7 @@ menu.deobfuscation=Deobfuskierung
menu.log=Log-Anzeige
menu.help=Hilfe
menu.about=Über
#menu.quark=
#menu.quark=Quark Engine
menu.update_label=Neue Version %s verfügbar!
file.open_action=Datei öffnen…
@@ -39,9 +39,9 @@ file.save_project_as=Projekt speichern als…
file.reload=Dateien neu laden
file.live_reload=Live nachladen
file.live_reload_desc=Dateien bei Änderungen autom. neuladen
#file.open_mappings=
#file.save_mappings=
#file.save_mappings_as=
#file.open_mappings=Open mappings...
#file.save_mappings=Save mappings
#file.save_mappings_as=Save mappings as...
#file.close_mappings=Zuordnungen exportieren als…
file.save_all=Alles speichern
#file.save=Save
@@ -70,7 +70,7 @@ progress.decompile=Dekompilieren
progress.canceling=Breche ab
error_dialog.title=Fehler
#error_dialog.not_found=
#error_dialog.not_found=%s not found
search.previous=Zurück
search.next=Weiter
@@ -79,7 +79,7 @@ search.regex=Regex
search.match_case=Groß/Kleinschreibung beachten
search.whole_word=Ganzes Wort
search.find=Suchen
#search.results=
#search.results=%s%d results
tabs.copy_class_name=Klassennamen kopieren
tabs.close=Schließen
@@ -153,8 +153,8 @@ search_dialog.comments=Kommentare
search_dialog.resource=Ressourcen
search_dialog.keep_open=Offen halten
search_dialog.tip_searching=Suchen…
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=Verwendungssuche
usage_dialog.label=Verwendungen von:
@@ -181,8 +181,8 @@ about_dialog.title=Über JADX
preferences.title=Einstellungen
preferences.deobfuscation=Deobfuskierung
preferences.appearance=Aussehen
#preferences.shortcuts=
#preferences.select_shortcuts=
#preferences.shortcuts=Shortcuts
#preferences.select_shortcuts=Select a specific shortcuts group
preferences.decompile=Dekompilierung
preferences.plugins=Plugins
preferences.project=Projekt
@@ -224,7 +224,7 @@ preferences.raw_cfg=RAW CFG-Grafiken generieren
#preferences.update_channel=Jadx update channel
#preferences.integerFormat=Integer format
preferences.font=Schrift ändern
#preferences.smali_font=
#preferences.smali_font=Monospaced font (Smali/Hex)
preferences.laf_theme=Thema
preferences.theme=Thema ändern
preferences.start_jobs=Autom. Hintergrunddekompilierung starten
@@ -288,9 +288,9 @@ msg.open_file=Bitte Datei öffnen
msg.saving_sources=Quelltexte speichern
msg.language_changed_title=Sprache speichern
msg.language_changed=Die neue Sprache wird beim nächsten Start der Anwendung angezeigt.
#msg.warning_title=
#msg.common_mouse_shortcut=
#msg.duplicate_shortcut=
#msg.warning_title=Warning
#msg.common_mouse_shortcut=This is a commonly used key, are you sure you would like to bind it to an action?
#msg.duplicate_shortcut=The shortcut %s is already set in action "%s" from category "%s", continue ?
msg.project_error_title=Fehler
msg.project_error=Projekt konnte nicht geladen werden
msg.cmd_select_class_error=Klasse\n%s auswählen nicht möglich\nSie existiert nicht.
@@ -325,7 +325,7 @@ popup.search_global=Globale Suche "%s"
#script.run=Run
#script.save=Save
#script.auto_complete=
#script.auto_complete=Auto Complete
#script.check=Check
#script.format=Reformat
#script.log=Show log
@@ -443,7 +443,7 @@ adb_dialog.restart_while_debugging_title=Neustart während der Fehlersuche
adb_dialog.restart_while_debugging_msg=Sie debuggen eine App, sind Sie sicher, dass Sie eine Sitzung neu starten können?
adb_dialog.starting_debugger=Debugger starten…
#action.variant=
#action_category.menu_toolbar=
#action_category.code_area=
#action_category.plugin_script=
#action.variant=%s (variant)
#action_category.menu_toolbar=Menu / Toolbar
#action_category.code_area=Code Area
#action_category.plugin_script=Plugin Script
@@ -2,12 +2,12 @@ language.name=Español
menu.file=Archivo
menu.view=Vista
#menu.recent_projects=
#menu.no_recent_projects=
#menu.recent_projects=Recent projects
#menu.no_recent_projects=No recent projects
menu.preferences=Preferencias
menu.sync=Sincronizar con el editor
menu.flatten=Mostrar paquetes en vista plana
#menu.heapUsageBar=
#menu.heapUsageBar=Show memory usage bar
#menu.alwaysSelectOpened=Always Select Opened File/Class
#menu.dock_log=Dock log viewer
#menu.dock_quick_tabs=Dock quick tabs
@@ -15,7 +15,7 @@ menu.navigation=Navegación
menu.text_search=Buscar texto
menu.class_search=Buscar clase
#menu.comment_search=Comment search
#menu.go_to_main_activity=
#menu.go_to_main_activity=Go to main Activity
#menu.go_to_application=Go to Application
#menu.go_to_android_manifest=Go to AndroidManifest.xml
menu.tools=Herramientas
@@ -26,23 +26,23 @@ menu.deobfuscation=Desofuscación
menu.log=Visor log
menu.help=Ayuda
menu.about=Acerca de...
#menu.quark=
#menu.quark=Quark Engine
menu.update_label=¡Nueva versión %s disponible!
file.open_action=Abrir archivo...
#file.add_files_action=Add files ...
file.open_title=Abrir archivo
#file.open_project=Open project
#file.new_project=
#file.save_project=
#file.save_project_as=
#file.new_project=New project
#file.save_project=Save project
#file.save_project_as=Save project as...
#file.reload=Reload files
#file.live_reload=Live reload
#file.live_reload_desc=Auto reload files on changes
#file.open_mappings=
#file.save_mappings=
#file.save_mappings_as=
#file.close_mappings=
#file.open_mappings=Open mappings...
#file.save_mappings=Save mappings
#file.save_mappings_as=Save mappings as...
#file.close_mappings=Close mappings
file.save_all=Guardar todo
#file.save=Save
file.export_gradle=Guardar como proyecto Gradle
@@ -65,12 +65,12 @@ tree.loading=Cargando...
#tree.bookmarked_tabs=Bookmarked Tabs
progress.load=Cargando
#progress.save_mappings=
#progress.save_mappings=Saving mappings
progress.decompile=Decompiling
#progress.canceling=Canceling
#error_dialog.title=
#error_dialog.not_found=
#error_dialog.title=Error
#error_dialog.not_found=%s not found
search.previous=Anterior
search.next=Siguiente
@@ -79,7 +79,7 @@ search.regex=Regex
search.match_case=Sensible a minúsculas/mayúsculas
search.whole_word=Palabra entera
search.find=Buscar
#search.results=
#search.results=%s%d results
tabs.copy_class_name=Copy Name
tabs.close=Cerrar
@@ -92,8 +92,8 @@ tabs.closeOthers=Cerrar otros
#tabs.pin=Pin
tabs.closeAll=Cerrar todo
tabs.closeAllRight=Cierra todo a la derecha
#tabs.code=
#tabs.smali=
#tabs.code=Code
#tabs.smali=Smali
nav.back=Atrás
nav.forward=Adelante
@@ -108,9 +108,9 @@ nav.forward=Adelante
#message.saveIncomplete=<html>Save incomplete.<br> %s<br> %d classes or resources were not saved!</html>
#message.indexIncomplete=<html>Index of some classes skipped.<br> %s<br> %d classes were not indexed and will not appear in search results!</html>
#message.indexingClassesSkipped=
#message.indexingClassesSkipped=<html>Jadx is running low on memory. Therefore %d classes were not indexed.<br>If you want all classes to be indexed restart Jadx with increased maximum heap size.</html>
#heapUsage.text=
#heapUsage.text=JADX memory usage: %.2f GB of %.2f GB
#common_dialog.ok=Ok
#common_dialog.cancel=Cancel
@@ -150,11 +150,11 @@ search_dialog.col_code=Código
search_dialog.regex=Regex
#search_dialog.active_tab=Active tab only
#search_dialog.comments=Comments
#search_dialog.resource=
#search_dialog.keep_open=
#search_dialog.tip_searching=
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.resource=Resource
#search_dialog.keep_open=Keep open
#search_dialog.tip_searching=Searching
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=Usage search
usage_dialog.label=Usage for:
@@ -163,7 +163,7 @@ usage_dialog.label=Usage for:
#comment_dialog.title.update=Update code comment
#comment_dialog.label=Comment:
#comment_dialog.style=Style:
#comment_dialog.usage=
#comment_dialog.usage=Use 'Shift + Enter' to start a new line
#rename_dialog.class_help=Enter full name to move class to another package. Start with '.' to move to default (empty) package
@@ -181,11 +181,11 @@ about_dialog.title=Sobre JADX
preferences.title=Preferencias
preferences.deobfuscation=Desofuscación
#preferences.appearance=Appearance
#preferences.shortcuts=
#preferences.select_shortcuts=
#preferences.shortcuts=Shortcuts
#preferences.select_shortcuts=Select a specific shortcuts group
preferences.decompile=Descompilación
#preferences.plugins=Plugins
#preferences.project=
#preferences.project=Project
preferences.other=Otros
preferences.language=Idioma
#preferences.lineNumbersMode=Editor line numbers mode
@@ -199,37 +199,37 @@ preferences.check_for_updates=Buscar actualizaciones al iniciar
preferences.showInconsistentCode=Mostrar código inconsistente
preferences.escapeUnicode=Escape unicode
preferences.replaceConsts=Reemplazar constantes
#preferences.respectBytecodeAccessModifiers=
#preferences.useImports=
#preferences.respectBytecodeAccessModifiers=Respect bytecode access modifiers
#preferences.useImports=Use import statements
#preferences.useDebugInfo=Use debug info
#preferences.inlineAnonymous=
#preferences.inlineAnonymous=Inline anonymous classes
#preferences.inlineMethods=Inline methods
#preferences.inlineKotlinLambdas=Allow to inline Kotlin Lambdas
#preferences.moveInnerClasses=Move inner classes into parent
#preferences.extractFinally=Extract finally block
#preferences.restoreSwitchOverString=Restore switch over string
#preferences.fsCaseSensitive=
#preferences.fsCaseSensitive=File system is case-sensitive
preferences.skipResourcesDecode=No descodificar recursos
#preferences.useKotlinMethodsForVarNames=Use kotlin methods for variables rename
#preferences.commentsLevel=Code comments level
#preferences.saveOption=Auto-save settings
preferences.threads=Número de hilos a procesar
#preferences.excludedPackages=
#preferences.excludedPackages.tooltip=
#preferences.excludedPackages.button=
#preferences.excludedPackages.editDialog=
#preferences.excludedPackages=Excluded packages
#preferences.excludedPackages.tooltip=List of space separated package names that will not be decompiled or indexed (saves RAM)
#preferences.excludedPackages.button=Edit
#preferences.excludedPackages.editDialog=<html>List of space separated package names that will not be decompiled or indexed (saves RAM)<br>e.g. <code>android.support</code></html>
preferences.cfg=Generar methods CFG graphs (in 'dot' format)
preferences.raw_cfg=Generate RAW CFG graphs
#preferences.xposed_codegen_language=Xposed code generation language
#preferences.update_channel=Jadx update channel
#preferences.integerFormat=Integer format
preferences.font=Fuente del editor
#preferences.smali_font=
#preferences.smali_font=Monospaced font (Smali/Hex)
#preferences.laf_theme=Theme
preferences.theme=Tema del editor
preferences.start_jobs=Inicio autom. descompilación de fondo
preferences.select_font=Seleccionar
#preferences.select_smali_font=
#preferences.select_smali_font=Change
preferences.deobfuscation_on=Activar desobfuscación
#preferences.generated_renames_mapping_file_mode=Map file handle mode
preferences.deobfuscation_min_len=Longitud mínima del nombre
@@ -245,10 +245,10 @@ preferences.reset_message=¿Reestablecer preferencias a valores por defecto?
preferences.reset_title=Reestablecer preferencias
#preferences.copy=Copy to clipboard
#preferences.copy_message=All settings values has been copied to clipboard
#preferences.rename=
#preferences.rename_case=
#preferences.rename_valid=
#preferences.rename_printable=
#preferences.rename=Rename identifiers
#preferences.rename_case=To fix case sensitivity issues
#preferences.rename_valid=To make them valid
#preferences.rename_printable=To make printable
preferences.rename_use_source_name_as_class_name_alias=Usar el nombre del source como alias para la clase
#preferences.search_group_title=Search
#preferences.search_results_per_page=Results per page (0 - no limit)
@@ -288,16 +288,16 @@ msg.open_file=Por favor, abra un archivo
msg.saving_sources=Guardando fuente
msg.language_changed_title=Idioma cambiado
msg.language_changed=El nuevo idioma se mostrará la próxima vez que la aplicación se inicie.
#msg.warning_title=
#msg.common_mouse_shortcut=
#msg.duplicate_shortcut=
#msg.project_error_title=
#msg.project_error=
#msg.cmd_select_class_error=
#msg.warning_title=Warning
#msg.common_mouse_shortcut=This is a commonly used key, are you sure you would like to bind it to an action?
#msg.duplicate_shortcut=The shortcut %s is already set in action "%s" from category "%s", continue ?
#msg.project_error_title=Error
#msg.project_error=Project could not be loaded
#msg.cmd_select_class_error=Failed to select the class\n%s\nThe class does not exist.
#msg.cant_add_comment=Can't add comment here
#popup.bytecode_col=
#popup.line_wrap=
#popup.bytecode_col=Show Dalvik Bytecode
#popup.line_wrap=Line Wrap
popup.undo=Deshacer
popup.redo=Rehacer
popup.cut=Cortar
@@ -307,15 +307,15 @@ popup.delete=Borrar
popup.select_all=Seleccionar todo
popup.frida=Copiar como fragmento de frida
popup.xposed=Copiar como fragmento de xposed
#popup.find_usage=
#popup.go_to_declaration=
#popup.exclude=
#popup.find_usage=Find Usage
#popup.go_to_declaration=Go to declaration
#popup.exclude=Exclude
#popup.exclude_packages=Exclude packages
#popup.add_comment=Comment
#popup.search_comment=Search comments
popup.rename=Renombrar
#popup.search=
#popup.search_global=
#popup.search=Search "%s"
#popup.search_global=Global Search "%s"
#popup.remove=Remove
#popup.add_files=Add files
#popup.add_scripts=Add scripts
@@ -325,7 +325,7 @@ popup.rename=Renombrar
#script.run=Run
#script.save=Save
#script.auto_complete=
#script.auto_complete=Auto Complete
#script.check=Check
#script.format=Reformat
#script.log=Show log
@@ -336,11 +336,11 @@ popup.rename=Renombrar
#exclude_dialog.deselect=Deselect
#exclude_dialog.invert=Invert
#confirm.save_as_title=
#confirm.save_as_message=
#confirm.not_saved_title=
#confirm.not_saved_message=
#confirm.remember=
#confirm.save_as_title=Confirm Save as
#confirm.save_as_message=%s already exists.\nDo you want to replace it?
#confirm.not_saved_title=Save project
#confirm.not_saved_message=Save the current project before proceeding?
#confirm.remember=Remember my decision
certificate.cert_type=Tipo
certificate.serialSigVer=Versión
@@ -351,7 +351,7 @@ certificate.serialValidUntil=Válido hasta
certificate.serialPubKeyType=Tipo de clave pública
certificate.serialPubKeyExponent=Exponente
certificate.serialPubKeyModulus=Módulo
#certificate.serialPubKeyModulusSize=
#certificate.serialPubKeyModulusSize=Modulus size (bits)
certificate.serialSigType=Tipo de firma
certificate.serialSigOID=Firma OID
certificate.serialMD5=Huella MD5
@@ -359,15 +359,15 @@ certificate.serialSHA1=Huella SHA-1
certificate.serialSHA256=Huella SHA-256
certificate.serialPubKeyY=Y
#apkSignature.signer=
#apkSignature.verificationSuccess=
#apkSignature.verificationFailed=
#apkSignature.signatureSuccess=
#apkSignature.signatureFailed=
#apkSignature.errors=
#apkSignature.warnings=
#apkSignature.exception=
#apkSignature.unprotectedEntry=
#apkSignature.signer=Signer
#apkSignature.verificationSuccess=Signature verification succeeded
#apkSignature.verificationFailed=Signature verification failed
#apkSignature.signatureSuccess=Valid APK signature v%d found
#apkSignature.signatureFailed=Invalid APK signature v%d found
#apkSignature.errors=Errors
#apkSignature.warnings=Warnings
#apkSignature.exception=APK verification failed
#apkSignature.unprotectedEntry=Files that are not protected by APK signature v1. Unauthorized modifications to these entries can only be detected by APK signature v2 and higher.
#issues_panel.label=Issues:
#issues_panel.errors=%d errors
@@ -443,7 +443,7 @@ certificate.serialPubKeyY=Y
#adb_dialog.restart_while_debugging_msg=You're debugging an app, are you sure to restart a session?
#adb_dialog.starting_debugger=Starting debugger...
#action.variant=
#action_category.menu_toolbar=
#action_category.code_area=
#action_category.plugin_script=
#action.variant=%s (variant)
#action_category.menu_toolbar=Menu / Toolbar
#action_category.code_area=Code Area
#action_category.plugin_script=Plugin Script
@@ -153,8 +153,8 @@ search_dialog.comments=Komentar
search_dialog.resource=Sumber daya
search_dialog.keep_open=Tetap terbuka
search_dialog.tip_searching=Mencari
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=Pencarian penggunaan
usage_dialog.label=Penggunaan untuk:
@@ -15,7 +15,7 @@ menu.navigation=네비게이션
menu.text_search=텍스트 검색
menu.class_search=클래스 검색
menu.comment_search=주석 검색
#menu.go_to_main_activity=
#menu.go_to_main_activity=Go to main Activity
#menu.go_to_application=Go to Application
#menu.go_to_android_manifest=Go to AndroidManifest.xml
menu.tools=도구
@@ -26,7 +26,7 @@ menu.deobfuscation=난독화 해제
menu.log=로그 뷰어
menu.help=도움말
menu.about=정보
#menu.quark=
#menu.quark=Quark Engine
menu.update_label=새 버전 %s 이(가) 존재합니다!
file.open_action=파일 열기 ...
@@ -39,9 +39,9 @@ file.save_project_as=다른 이름으로 프로젝트 저장...
file.reload=파일 다시 로드
file.live_reload=라이브 로드
file.live_reload_desc=파일 내용 변경 시 자동으로 다시 로드
#file.open_mappings=
#file.open_mappings=Open mappings...
file.save_mappings=다른 이름으로 매핑 내보내기...
#file.save_mappings_as=
#file.save_mappings_as=Save mappings as...
#file.close_mappings=다른 이름으로 매핑 내보내기...
file.save_all=모두 저장
#file.save=Save
@@ -70,7 +70,7 @@ progress.decompile=디컴파일 중
progress.canceling=취소 중
error_dialog.title=오류
#error_dialog.not_found=
#error_dialog.not_found=%s not found
search.previous=이전
search.next=다음
@@ -79,7 +79,7 @@ search.regex=정규식
search.match_case=매치 케이스
search.whole_word=전체 단어
search.find=찾기
#search.results=
#search.results=%s%d results
tabs.copy_class_name=이름 복사
tabs.close=닫기
@@ -153,8 +153,8 @@ search_dialog.comments=주석
search_dialog.resource=리소스
search_dialog.keep_open=열어 두기
search_dialog.tip_searching=검색 중...
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=사용 검색
usage_dialog.label=다음의 사용 검색 결과:
@@ -181,8 +181,8 @@ about_dialog.title=JADX 정보
preferences.title=설정
preferences.deobfuscation=난독화 해제
preferences.appearance=외관
#preferences.shortcuts=
#preferences.select_shortcuts=
#preferences.shortcuts=Shortcuts
#preferences.select_shortcuts=Select a specific shortcuts group
preferences.decompile=디컴파일
preferences.plugins=플러그인
preferences.project=프로젝트
@@ -224,7 +224,7 @@ preferences.raw_cfg=RAW CFG 그래프 생성
#preferences.update_channel=Jadx update channel
#preferences.integerFormat=Integer format
preferences.font=에디터 글씨체
#preferences.smali_font=
#preferences.smali_font=Monospaced font (Smali/Hex)
preferences.laf_theme=테마
preferences.theme=에디터 테마
preferences.start_jobs=백그라운드에서 디컴파일 자동 시작
@@ -288,9 +288,9 @@ msg.open_file=파일을 여십시오
msg.saving_sources=소스 저장 중
msg.language_changed_title=언어 변경됨
msg.language_changed=다음에 응용 프로그램이 시작되면 새 언어가 표시됩니다.
#msg.warning_title=
#msg.common_mouse_shortcut=
#msg.duplicate_shortcut=
#msg.warning_title=Warning
#msg.common_mouse_shortcut=This is a commonly used key, are you sure you would like to bind it to an action?
#msg.duplicate_shortcut=The shortcut %s is already set in action "%s" from category "%s", continue ?
msg.project_error_title=오류
msg.project_error=프로젝트를 로드 할 수 없습니다.
msg.cmd_select_class_error=클래스를 선택하지 못했습니다.\n%s\n클래스가 없습니다.
@@ -325,7 +325,7 @@ popup.search_global="%s" 전역 검색
#script.run=Run
#script.save=Save
#script.auto_complete=
#script.auto_complete=Auto Complete
#script.check=Check
#script.format=Reformat
#script.log=Show log
@@ -443,7 +443,7 @@ adb_dialog.restart_while_debugging_title=디버깅중 다시 시작
adb_dialog.restart_while_debugging_msg=앱을 디버깅하고 있습니다. 세션을 다시 시작 하시겠습니까?
adb_dialog.starting_debugger=디버거 시작 중 ...
#action.variant=
#action_category.menu_toolbar=
#action_category.code_area=
#action_category.plugin_script=
#action.variant=%s (variant)
#action_category.menu_toolbar=Menu / Toolbar
#action_category.code_area=Code Area
#action_category.plugin_script=Plugin Script
@@ -15,7 +15,7 @@ menu.navigation=Navegação
menu.text_search=Buscar por texto
menu.class_search=Buscar por classe
menu.comment_search=Busca por comentário
#menu.go_to_main_activity=
#menu.go_to_main_activity=Go to main Activity
#menu.go_to_application=Go to Application
#menu.go_to_android_manifest=Go to AndroidManifest.xml
menu.tools=Ferramentas
@@ -26,7 +26,7 @@ menu.deobfuscation=Desofuscar
menu.log=Visualizador de log
menu.help=Ajuda
menu.about=Sobre
#menu.quark=
#menu.quark=Quark Engine
menu.update_label=Nova versão %s disponível!
file.open_action=Abrir arquivos...
@@ -70,7 +70,7 @@ progress.decompile=Descompilando
progress.canceling=Cancelando
error_dialog.title=Erro
#error_dialog.not_found=
#error_dialog.not_found=%s not found
search.previous=Anterior
search.next=Próximo
@@ -79,7 +79,7 @@ search.regex=Regex
search.match_case=Match Case
search.whole_word=Palavra inteira
search.find=Encontrar
#search.results=
#search.results=%s%d results
tabs.copy_class_name=Copiar nome
tabs.close=Fechar
@@ -153,8 +153,8 @@ search_dialog.comments=Comentários
search_dialog.resource=Recursos
search_dialog.keep_open=Manter aberto
search_dialog.tip_searching=Buscando
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=Busca por utilização
usage_dialog.label=Usado por:
@@ -181,8 +181,8 @@ about_dialog.title=Sobre o JADX
preferences.title=Preferências
preferences.deobfuscation=Desofuscar
preferences.appearance=Aparência
#preferences.shortcuts=
#preferences.select_shortcuts=
#preferences.shortcuts=Shortcuts
#preferences.select_shortcuts=Select a specific shortcuts group
preferences.decompile=Descompilação
preferences.plugins=Plugins
preferences.project=Projeto
@@ -224,7 +224,7 @@ preferences.raw_cfg=Gera gráficos CFG no formato RAW
#preferences.update_channel=Jadx update channel
#preferences.integerFormat=Integer format
preferences.font=Fonte do editor
#preferences.smali_font=
#preferences.smali_font=Monospaced font (Smali/Hex)
preferences.laf_theme=Tema
preferences.theme=Tema do editor
preferences.start_jobs=Inicializar descompilação automaticamente em segundo-plano
@@ -288,9 +288,9 @@ msg.open_file=Abra um arquivo
msg.saving_sources=Salvando recursos
msg.language_changed_title=Idioma alterado
msg.language_changed=Novo idioma será mostrado na próxima inicialização.
#msg.warning_title=
#msg.common_mouse_shortcut=
#msg.duplicate_shortcut=
#msg.warning_title=Warning
#msg.common_mouse_shortcut=This is a commonly used key, are you sure you would like to bind it to an action?
#msg.duplicate_shortcut=The shortcut %s is already set in action "%s" from category "%s", continue ?
msg.project_error_title=Erro
msg.project_error=Projeto não pôde ser carregado
msg.cmd_select_class_error=Falha ao selecionar classe\n%s\nA classe não existe.
@@ -325,7 +325,7 @@ popup.search_global=Busca global "%s"
#script.run=Run
#script.save=Save
#script.auto_complete=
#script.auto_complete=Auto Complete
#script.check=Check
#script.format=Reformat
#script.log=Show log
@@ -443,7 +443,7 @@ adb_dialog.restart_while_debugging_title=Reiniciar enquanto depura
adb_dialog.restart_while_debugging_msg=Você está depurando um aplicativo, você tem certeza que deseja reiniciar a sessão?
adb_dialog.starting_debugger=Iniciando depurador...
#action.variant=
#action_category.menu_toolbar=
#action_category.code_area=
#action_category.plugin_script=
#action.variant=%s (variant)
#action_category.menu_toolbar=Menu / Toolbar
#action_category.code_area=Code Area
#action_category.plugin_script=Plugin Script
@@ -26,7 +26,7 @@ menu.deobfuscation=Деобфускация
menu.log=Просмотр логов
menu.help=Помощь
menu.about=О программе
#menu.quark=
#menu.quark=Quark Engine
menu.update_label=Версия %s уже доступна!
file.open_action=Открыть файлы...
@@ -153,8 +153,8 @@ search_dialog.comments=Комментарии
search_dialog.resource=Ресурсы
search_dialog.keep_open=Оставлять поиск открытым
search_dialog.tip_searching=Поиск...
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=Поиск использований
usage_dialog.label=Использования:
@@ -153,8 +153,8 @@ search_dialog.comments=注释
search_dialog.resource=资源
search_dialog.keep_open=保持窗口
search_dialog.tip_searching=搜索中…
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=查找
usage_dialog.label=查找用例:
@@ -153,8 +153,8 @@ search_dialog.comments=註解
search_dialog.resource=資源
search_dialog.keep_open=保持開啟
search_dialog.tip_searching=正在搜尋
#search_dialog.limit_package=
#search_dialog.package_not_found=
#search_dialog.limit_package=Limit to package:
#search_dialog.package_not_found=No matching package found
usage_dialog.title=使用情況搜尋
usage_dialog.label=使用情況:
+57 -35
View File
@@ -9,34 +9,34 @@ import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import jadx.gui.utils.LangLocale;
import jadx.gui.utils.NLS;
import static java.nio.file.Files.exists;
import static java.nio.file.Paths.get;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
public class TestI18n {
private static final String DEFAULT_LANG_FILE = "Messages_en_US.properties";
private static Path guiJavaPath;
private static Path i18nPath;
private List<String> reference;
private String referenceName;
private static Path refPath;
private static Path guiJavaPath;
@BeforeAll
public static void init() {
i18nPath = get("src/main/resources/i18n");
assertThat(exists(i18nPath)).isTrue();
assertThat(i18nPath).exists();
refPath = i18nPath.resolve(DEFAULT_LANG_FILE);
assertThat(refPath).exists();
guiJavaPath = get("src/main/java");
assertThat(exists(guiJavaPath)).isTrue();
assertThat(guiJavaPath).exists();
}
@Test
@@ -51,38 +51,60 @@ public class TestI18n {
@Test
public void filesExactlyMatch() throws IOException {
List<String> reference = Files.readAllLines(refPath)
.stream()
.map(TestI18n::getPrefix)
.collect(Collectors.toList());
try (Stream<Path> list = Files.list(i18nPath)) {
list.forEach(p -> {
List<String> lines;
try {
lines = Files.readAllLines(p);
if (reference == null) {
reference = lines;
referenceName = p.getFileName().toString();
} else {
compareToReference(p);
}
} catch (IOException e) {
Assertions.fail("Error " + e.getMessage());
}
});
list.filter(p -> !p.equals(refPath))
.forEach(path -> compareToReference(path, reference));
}
}
private void compareToReference(Path path) throws IOException {
List<String> lines = Files.readAllLines(path);
for (int i = 0; i < reference.size(); i++) {
String line = trimComment(reference.get(i));
int p0 = line.indexOf('=');
if (p0 != -1) {
String prefix = line.substring(0, p0 + 1);
if (i >= lines.size() || !trimComment(lines.get(i)).startsWith(prefix)) {
/**
* Extract prefix: 'key='
*/
private static String getPrefix(String line) {
if (line.isBlank()) {
return "";
}
int sep = line.indexOf('=');
if (sep == -1) {
return line;
}
if (line.startsWith("#")) {
fail(DEFAULT_LANG_FILE + " shouldn't contain commented values: " + line);
}
return line.substring(0, sep + 1);
}
private void compareToReference(Path path, List<String> reference) {
try {
List<String> lines = Files.readAllLines(path);
for (int i = 0; i < reference.size(); i++) {
String prefix = reference.get(i);
if (prefix.isEmpty()) {
continue;
}
if (i >= lines.size()) {
fail("File '" + path.getFileName() + "' contains unexpected lines at end");
}
String line = lines.get(i);
if (!trimComment(line).startsWith(prefix)) {
failLine(path, i + 1);
}
if (line.startsWith("#")) {
int sep = line.indexOf('=');
if (line.substring(sep + 1).isBlank()) {
fail("File '" + path.getFileName() + "' has empty ref text at line " + (i + 1) + ": " + line);
}
}
}
}
if (lines.size() != reference.size()) {
failLine(path, reference.size());
if (lines.size() != reference.size()) {
failLine(path, reference.size());
}
} catch (IOException e) {
fail("Process error ", e);
}
}
@@ -91,13 +113,13 @@ public class TestI18n {
}
private void failLine(Path path, int line) {
fail("I18n files " + path.getFileName() + " and " + referenceName + " differ in line " + line);
fail("I18n file: " + path.getFileName() + " and " + DEFAULT_LANG_FILE + " differ in line " + line);
}
@Test
public void keyIsUsed() throws IOException {
Properties properties = new Properties();
try (Reader reader = Files.newBufferedReader(i18nPath.resolve("Messages_en_US.properties"))) {
try (Reader reader = Files.newBufferedReader(i18nPath.resolve(DEFAULT_LANG_FILE))) {
properties.load(reader);
}
Set<String> keys = new HashSet<>();