tolgee / tolgee-platform

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

Exporting Android Text with non positional arguments leads to lint warning #2392

Open Nailik opened 4 months ago

Nailik commented 4 months ago

Describe the bug Tolgee exports strings for Android in a way that they are reported by android lint. This is only visible when running the build command and not directly in Android Studio.

To Reproduce Steps to reproduce the behavior:

  1. Define a text with 2 tolgee universal placeholders for example:{0} um {1}
  2. Export for android
  3. The export is: %s um %s
  4. When building an Android project with this text there is a warning: Multiple substitutions specified in non-positional format of string resource string/at_with_placeholder. Did you mean to add the formatted="false" attribute?

Expected behavior Tolgee exports should not lead to a lint warning.

Possible solutions (i would prefer if you can choose which one to use while exporting, like a selection box where you can either choose: use non-positional arguments with formatted="false" or use positional arguments. Also allow to set it when exporting it via rest. If the decision is to not make this selectable then use positional arguments for android because hiding warnings is always worse than fix them in the first place.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

Nailik commented 3 months ago

no it's not completed! @JanCizmar the bot should really stop just closing issues.

JanCizmar commented 3 months ago

Bad bot! 🤖