Skip to contentSkip to conversation

Explicit indexing for 'import_partial_success'

PATCH Applied Eiji Tanioka 2 participants 3 messages Mar 25, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Explicit indexing for 'import_partial_success'

When translate it to Japanese, values are exchanged. For example, '1 of 10' is '10 個中の 1'.

So this string should be explicit indexed.

---
 ui/src/main/res/values/strings.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ui/src/main/res/values/strings.xml +2 -2
index 70d92c3..74c5be6 100644
@@ -13,8 +13,8 @@
         <item quantity="other">%d tunnels selected</item>
     </plurals>
     <plurals name="import_partial_success">
-        <item quantity="one">Imported %d of %d tunnels</item>
-        <item quantity="other">Imported %d of %d tunnels</item>
+        <item quantity="one">Imported %1$d of %2$d tunnels</item>
+        <item quantity="other">Imported %1$d of %2$d tunnels</item>
     </plurals>
     <plurals name="import_total_success">
         <item quantity="one">Imported %d tunnel</item>
Signature · 1 line
2.25.2
#1 lore raw

Or is it possible to apply this fix only to Japanese in crowdin?

2020年3月25日(水) 21:19 Eiji Tanioka <[email protected]>:

Quoted 29 lines

When translate it to Japanese, values are exchanged. For example, '1 of 10' is '10 個中の 1'.

So this string should be explicit indexed.

---
 ui/src/main/res/values/strings.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ui/src/main/res/values/strings.xml +2 -3
index 70d92c3..74c5be6 100644
@@ -13,8 +13,8 @@
         <item quantity="other">%d tunnels selected</item>
     </plurals>
     <plurals name="import_partial_success">
-        <item quantity="one">Imported %d of %d tunnels</item>
-        <item quantity="other">Imported %d of %d tunnels</item>
+        <item quantity="one">Imported %1$d of %2$d tunnels</item>
+        <item quantity="other">Imported %1$d of %2$d tunnels</item>
     </plurals>
     <plurals name="import_total_success">
         <item quantity="one">Imported %d tunnel</item>
--

2.25.2

#2 lore raw
Quoted 2 lines · Eiji Tanioka

Or is it possible to apply this fix only to Japanese in crowdin?

There's no need to do that, this fix is applicable to all languages including the default English.

Quoted 22 lines

2020年3月25日(水) 21:19 Eiji Tanioka <[email protected]>:

Quoted 21 lines

When translate it to Japanese, values are exchanged. For example, '1 of 10' is '10 個中の 1'.

So this string should be explicit indexed.

---
 ui/src/main/res/values/strings.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ui/src/main/res/values/strings.xml +0 -2
index 70d92c3..74c5be6 100644
@@ -13,8 +13,8 @@
         <item quantity="other">%d tunnels selected</item>
     </plurals>
     <plurals name="import_partial_success">
-        <item quantity="one">Imported %d of %d tunnels</item>
-        <item quantity="other">Imported %d of %d tunnels</item>
Quoted 8 lines
Quoted 8 lines
ui/src/main/res/values/strings.xml +2 -1
+        <item quantity="one">Imported %1$d of %2$d tunnels</item>
+        <item quantity="other">Imported %1$d of %2$d tunnels</item>
     </plurals>
     <plurals name="import_total_success">
         <item quantity="one">Imported %d tunnel</item>
--

2.25.2

Applied, thanks!