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
42b78437
Commit
42b78437
authored
Mar 22, 2019
by
tRuNKator
Committed by
skylot
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use quantity attribute for plurals (PR #486)
parent
d5f42662
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
ResXmlGen.java
jadx-core/src/main/java/jadx/core/xmlgen/ResXmlGen.java
+18
-10
No files found.
jadx-core/src/main/java/jadx/core/xmlgen/ResXmlGen.java
View file @
42b78437
...
...
@@ -15,6 +15,8 @@ import jadx.core.xmlgen.entry.RawNamedValue;
import
jadx.core.xmlgen.entry.ResourceEntry
;
import
jadx.core.xmlgen.entry.ValuesParser
;
import
static
jadx
.
core
.
xmlgen
.
ParserConstants
.
PLURALS_MAP
;
public
class
ResXmlGen
{
private
static
final
Set
<
String
>
SKIP_RES_TYPES
=
new
HashSet
<>(
Arrays
.
asList
(
...
...
@@ -147,16 +149,22 @@ public class ResXmlGen {
}
}
}
if
(
typeName
.
equals
(
"attr"
))
{
if
(
nameStr
!=
null
)
{
addSimpleValue
(
cw
,
typeName
,
itemTag
,
nameStr
,
valueStr
,
""
);
}
}
else
if
(
typeName
.
equals
(
"style"
))
{
if
(
nameStr
!=
null
)
{
addSimpleValue
(
cw
,
typeName
,
itemTag
,
nameStr
,
""
,
valueStr
);
}
}
else
{
addSimpleValue
(
cw
,
typeName
,
itemTag
,
null
,
null
,
valueStr
);
switch
(
typeName
)
{
case
"attr"
:
if
(
nameStr
!=
null
)
addSimpleValue
(
cw
,
typeName
,
itemTag
,
nameStr
,
valueStr
,
""
);
break
;
case
"style"
:
if
(
nameStr
!=
null
)
addSimpleValue
(
cw
,
typeName
,
itemTag
,
nameStr
,
""
,
valueStr
);
break
;
case
"plurals"
:
final
String
quantity
=
PLURALS_MAP
.
get
(
value
.
getNameRef
());
addSimpleValue
(
cw
,
typeName
,
itemTag
,
"quantity"
,
quantity
,
valueStr
);
break
;
default
:
addSimpleValue
(
cw
,
typeName
,
itemTag
,
null
,
null
,
valueStr
);
break
;
}
}
...
...
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