Page 1 of 1

translation - order of variables

Posted: Sat Dec 20, 2025 7:13 am
by user0
Note
when localizing strings with variables you have to:
- know what these variables mean to avoid issues AND
- follow exact variables/words order, especially when working with lists, where other options exist

Example
'Duplicate files naming' setting has 5 options (Settings>General>File operations):
   <Filename> - Copy (#) default
   <Filename>-Copy (#)
   <Filename>-(#)
   <Filename>-#
   Copy (#) of <Filename>
  • Copy (#) of <Filename>
    uses 2 strings when creating 1st and nth copies:
       Copy of %1%2
       Copy (%3) of %1%2
       where
          %1 - name
          %2 - .ext
          %3 - iterator
Issue A
orange - translation of 5th option name is not direct enough in some languages, which duplicates one of the previous option
yellow - other minor issues (eg missing space/dash, translation inconsistency)
translation_variables_order_option_naming.png
translation_variables_order_option_naming.png (280.86 KiB) Viewed 38 times

Issue B
translation of 5th option's related strings is not direct enough as well

test
in v1.9.8 lets
1. select 'Copy (#) of <Filename>' and change app language
2. copy TEST.jpg few times to check how app will name files

results
  • English
    • correct
      Copy of %1%2
      Copy (%3) of %1%2
      Copy of TEST.jpg
      Copy (2) of TEST.jpg
  • Armenian
    • incorrect - unrecognizable ext
      Պատճենվում է %1%2-ից
      Պատճենվում է (%3)-ը %1%2-ից
      Պատճենվում է TEST.jpg-ից
      Պատճենվում է (2)-ը TEST.jpg-ից
    • should be
      Պատճենվում է %1%2
      Պատճենվում է (%3)-ը %1%2
  • Chinese (both)
    • incorrect - repeats already existing option
      %1的副本%2
      %1的副本(%3)%2
      TEST的副本.jpg
      TEST的副本(2).jpg
    • should be
      的副本 %1%2
      的副本 (%3) %1%2
  • Finnish
    • incorrect - 0 length file
      Kopioi (%3) %1%2:sta
    • should be
      Kopioi (%3) %1%2
  • Hungarian
    • incorrect - repeats already existing option
      %1 másolata%2
      %1 másolata (%3)%2
      TEST másolata.jpg
      TEST másolata (2).jpg
    • should be
      Másolat %1%2
      Másolat (%3) %1%2
  • Japanese
    • incorrect - repeats already existing option
      %1のコピー%2
      %1コピー(%3) %2
      TESTのコピー.jpg
      TESTコピー(2) .jpg
    • should be
      コピー %1%2
      コピー(%3) %1%2
  • Korean
    • incorrect - unrecognizable ext
      %1%2의 사본
      %1%2의 사본 (%3)
      TEST.jpg의 사본
      TEST.jpg의 사본 (2)
    • should be
      의 사본 %1%2
      의 사본 (%3) %1%2
  • Turkish
    • incorrect - unrecognizable ext
      %1%2 in Kopyası
      %1%2 in (%3) Kopyası
      TEST.jpg in Kopyası
      TEST.jpg in (2) Kopyası
    • should be
      Kopyası in %1%2
      Kopyası (%3) in %1%2
  • Ukrainian
    • incorrect - does not change filename of n copy due to mistype
      Копіюється (%2) з %1%2
      Копіюється (.jpg) з TEST.jpg
    • should be
      Копіюється (%3) з %1%2

Conclusion
To avoid most of the issues listed above - ORDER of variables and words 'Copy' and 'of' (if applicable) MUST remain the same.
No need to be creative with your 'localization', use direct translation, especially in cases where other options are already available in the combobox/list/etc.