abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
473 stars 113 forks source link

BRouter translations #645

Closed devemux86 closed 7 months ago

devemux86 commented 7 months ago

There are several texts in the code that can be moved to strings.xml and translated as well.

The translations were contributed by Cruiser users:

afischerdev commented 7 months ago

This breaks on git action but runs on a local gradlew build:

BInstallerActivity.java:174: Error: Format string 'summary_segments' is not a valid format string

<string name="summary_segments" formatted="false">Size=%s\nFree=%s</string>

Any idea?

devemux86 commented 7 months ago

Interesting that there is a Lint error.

However if we do not use the formatted="false" then the build of release apk shows the warning: Multiple substitutions specified in non-positional format of string resource string/summary_segments. Did you mean to add the formatted="false" attribute?

We better try with positional arguments or split the string.

devemux86 commented 7 months ago

@afischerdev please run the workflow again.

Don't they run automatically after the first approval?

afischerdev commented 7 months ago

or split the string.

Yes, but this one has also warnings:

Do not concatenate text displayed withsetText. Use resource string with placeholders.

Don't they run automatically after the first approval?

I've seen, but can't say why.

devemux86 commented 7 months ago

This should not be considered as a serious problem, but as also the current master branch shows warnings on production builds (please see above), so something else may be needed, I will check it.

devemux86 commented 7 months ago

@afischerdev please let's try again the build.

devemux86 commented 7 months ago

@afischerdev is the Lint successful now on these changes?

afischerdev commented 7 months ago

@devemux86 fine now.

After merge I'll start the collection for the other hard coded strings. I hope there are some candidates for remove.

afischerdev commented 7 months ago

Thank you for contribution.