tolgee / tolgee-platform

Developer & translator friendly web-based localization platform
https://tolgee.io
Other
1.2k stars 91 forks source link

iOS export/import issues #2216

Closed albertad23 closed 3 weeks ago

albertad23 commented 1 month ago

Hi, I noticed some issues while testing iOS export/import functionality:

  1. When importing, \n is interpreted as a literal new line in the exported content.

    for example: "key" = "halo\nworld"; will be exported as

    "key" = "halo
          world";
  2. %s will be exported as %%s for example "key" = "halo %s"; --> "key" = "halo %%s";

Thanks for looking!

JanCizmar commented 1 month ago

Hello! Thanks for reporting!

When importing, \n is interpreted as a literal new line in the exported content.

Is this causing any issues in your target app? Semantically the \n has the same meaning as new-line, so Tolgee doesn't escape new-lines by default when exporting.

%s will be exported as %%s

This is expected behaviour when exporting data. If you have enabled Tolgee Universal ICU placeholders in the project settings (advanced tab), you are expected to use placeholders lik {0} {1} and such placeholders will be exported to Apple placeholders. The % is considered a percent sign and so it's escaped when exporting to Apple format.