nutritionfactsorg / daily-dozen-android

Keep track of the foods that Dr. Greger recommends in his NYT's best-selling book, How Not to Die with this Android app
https://play.google.com/store/apps/details?id=org.nutritionfacts.dailydozen&hl=en
Other
274 stars 95 forks source link

russian update, escaped quotes, %s simplification #205

Closed marc-medley closed 2 years ago

marc-medley commented 2 years ago

@slavick This PR has several updates:

  1. Russian has an upated translation. see https://github.com/nutritionfactsorg/daily-dozen-localization/issues/9
  2. Resolves an issues daily-dozen-localization where the single quote should be escaped as \' when generating the strings.xml files.
    • This would affect the presentation of several translations (e.g. Italian which use lots of single quotes).
  3. The double quotes are also now escaped \" in the content.
  4. The uses of %1$s have been replaced with a simplified %s. The thinking is:
    • 1$ does not appear to be programmatically needed in the Java code.
    • %s formatter can also work in the iOS Swift code.
      • A common format allows for several translation rows to be common for the Android and Apple devices.
      • However, %1$s is not support in a Swift formatter string.
    • %s is easer than %1$s for translators to work with in the spreadsheet

string_format

marc-medley commented 2 years ago

@slavick I did some additional XML detailed regression checking which resulted in commit https://github.com/nutritionfactsorg/daily-dozen-android/pull/205/commits/73ab04fa8036fb9fa23baf3970bb0d4efc12efd9.

This last commit fixed two discovered issues:

The escaped quotes (\' and \") were verified to be as expected. And, the source *.tsv files were verified free of any remaining \' which would have caused a \\' in the *.xml.

So, with that, I think this pull request is ready to be put into a test build when you have time.

marc-medley commented 2 years ago

@slavick And, one more thing... a minor Italian update did also get added. See: https://github.com/nutritionfactsorg/daily-dozen-localization/issues/12#issuecomment-1146385763