Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
ba6dd081
Commit
ba6dd081
authored
Mar 27, 2019
by
Ahmed Ashour
Committed by
skylot
Mar 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): add missing translations keys, and ensure all files match (PR #525)
parent
7cdb0318
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
5 deletions
+95
-5
MainWindow.java
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
+1
-1
Messages_en_US.properties
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
+3
-2
Messages_es_ES.properties
jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
+24
-0
Messages_zh_CN.properties
jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
+3
-2
TestI18n.java
jadx-gui/src/test/java/jadx/gui/TestI18n.java
+64
-0
No files found.
jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
View file @
ba6dd081
...
...
@@ -756,7 +756,7 @@ public class MainWindow extends JFrame {
}
private
class
JPackagePopUp
extends
JPopupMenu
{
JMenuItem
excludeItem
=
new
JCheckBoxMenuItem
(
"Exclude"
);
JMenuItem
excludeItem
=
new
JCheckBoxMenuItem
(
NLS
.
str
(
"popup.exclude"
)
);
public
JPackagePopUp
(
JPackage
pkg
)
{
excludeItem
.
setSelected
(!
pkg
.
isEnabled
());
...
...
jadx-gui/src/main/resources/i18n/Messages_en_US.properties
View file @
ba6dd081
...
...
@@ -124,8 +124,9 @@ popup.copy=Copy
popup.paste
=
Paste
popup.delete
=
Delete
popup.select_all
=
Select All
popup.find_usage
=
Find Usage
popup.exclude
=
Exclude
certificate.title
=
Certificate
certificate.cert_type
=
Type
certificate.serialSigVer
=
Version
...
...
@@ -147,7 +148,7 @@ certificate.serialPubKeyY=Y
apkSignature.signer
=
Signer
apkSignature.verificationSuccess
=
Signature verification succeeded
apkSignature.verificationFailed
=
Signature verification
succeed
ed
apkSignature.verificationFailed
=
Signature verification
fail
ed
apkSignature.signatureSuccess
=
Valid APK signature v%d found
apkSignature.signatureFailed
=
Invalid APK signature v%d found
apkSignature.errors
=
Errors
...
...
jadx-gui/src/main/resources/i18n/Messages_es_ES.properties
View file @
ba6dd081
...
...
@@ -7,6 +7,7 @@ menu.no_recent_files=No hay archivos recientes
menu.preferences
=
Preferencias
menu.sync
=
Sincronizar con el editor
menu.flatten
=
Mostrar paquetes en vista plana
#menu.heapUsageBar=
menu.navigation
=
Navegación
menu.text_search
=
Buscar texto
menu.class_search
=
Buscar clase
...
...
@@ -46,6 +47,10 @@ tabs.closeAll=Cerrar todo
nav.back
=
Atrás
nav.forward
=
Adelante
#message.indexingClassesSkipped=
#heapUsage.text=
search_dialog.open
=
Abrir
search_dialog.cancel
=
Cancelar
search_dialog.open_by_name
=
Buscar texto:
...
...
@@ -81,8 +86,14 @@ preferences.fallback=Modo fallback (simple dump)
preferences.showInconsistentCode
=
Mostrar código inconsistente
preferences.escapeUnicode
=
Escape unicode
preferences.replaceConsts
=
Reemplazar constantes
#preferences.respectBytecodeAccessModifiers=
#preferences.useImports=
preferences.skipResourcesDecode
=
No descodificar recursos
preferences.threads
=
Número de hilos a procesar
#preferences.excludedPackages=
#preferences.excludedPackages.tooltip=
#preferences.excludedPackages.button=
#preferences.excludedPackages.editDialog=
preferences.cfg
=
Generar methods CFG graphs (in 'dot' format)
preferences.raw_cfg
=
Generate RAW CFG graphs
preferences.font
=
Fuente del editor
...
...
@@ -113,6 +124,8 @@ popup.copy=Copiar
popup.paste
=
Pegar
popup.delete
=
Borrar
popup.select_all
=
Seleccionar todo
#popup.find_usage=
#popup.exclude=
certificate.title
=
Certificado
certificate.cert_type
=
Tipo
...
...
@@ -125,9 +138,20 @@ certificate.serialValidUntil=Válido hasta
certificate.serialPubKeyType
=
Tipo de clave pública
certificate.serialPubKeyExponent
=
Exponente
certificate.serialPubKeyModulus
=
Módulo
#certificate.serialPubKeyModulusSize=
certificate.serialSigType
=
Tipo de firma
certificate.serialSigOID
=
Firma OID
certificate.serialMD5
=
Huella MD5
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=
jadx-gui/src/main/resources/i18n/Messages_zh_CN.properties
View file @
ba6dd081
...
...
@@ -124,8 +124,9 @@ popup.copy=复制
popup.paste
=
粘贴
popup.delete
=
删除
popup.select_all
=
全选
popup.find_usage
=
查找用例
#popup.exclude=
certificate.title
=
证书
certificate.cert_type
=
类型
certificate.serialSigVer
=
版本
...
...
@@ -147,7 +148,7 @@ certificate.serialPubKeyY=Y
apkSignature.signer
=
签名人
apkSignature.verificationSuccess
=
签名验证成功
apkSignature.verificationFailed
=
签名验证成功
#apkSignature.verificationFailed=
apkSignature.signatureSuccess
=
找到有效的 APK 签名 v%d
apkSignature.signatureFailed
=
找到无效的 APK 签名 v%d
apkSignature.errors
=
错误
...
...
jadx-gui/src/test/java/jadx/gui/TestI18n.java
0 → 100644
View file @
ba6dd081
package
jadx
.
gui
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertTrue
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.List
;
import
org.junit.jupiter.api.Assertions
;
import
org.junit.jupiter.api.Test
;
public
class
TestI18n
{
private
List
<
String
>
reference
;
private
String
referenceName
;
@Test
public
void
filesExactlyMatch
()
throws
IOException
{
Path
path
=
Paths
.
get
(
"./src/main/resources/i18n"
);
assertTrue
(
Files
.
exists
(
path
));
Files
.
list
(
path
).
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
());
}
});
}
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
))
{
fail
(
path
,
i
+
1
);
}
}
}
if
(
lines
.
size
()
!=
reference
.
size
())
{
fail
(
path
,
reference
.
size
());
}
}
private
static
String
trimComment
(
String
string
)
{
return
string
.
startsWith
(
"#"
)
?
string
.
substring
(
1
)
:
string
;
}
private
void
fail
(
Path
path
,
int
line
)
{
Assertions
.
fail
(
"I18n files "
+
path
.
getFileName
()
+
" and "
+
referenceName
+
" differ in line "
+
line
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment