Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character Escape Issue in French Localization ("Aujourd'hui" Displayed Incorrectly) #3046

Closed
dev-a opened this issue Sep 13, 2024 · 3 comments

Comments

@dev-a
Copy link

dev-a commented Sep 13, 2024

Hello,

I wanted to give some feedback regarding a character escape issue in the French version of the app.

On the "Today" page, the word "Aujourd'hui" is displayed as "Aujourd'hui" with a backslash before the apostrophe.

Here’s a screenshot for reference:

Screenshot_Tasks

I did a quick search on the translation platform (https://hosted.weblate.org/projects/tasks/android/) but was unable to locate the source of the problem.

Version: 13.11.1

@layus
Copy link

layus commented Nov 12, 2024

To add on this, the label is improperly displayed in a header for example here:


from here:
<string name="today">Aujourd\'hui</string>

or here:
<string name="today">Aujourd\'hui</string>

But quotes are properly displayed in the parameters list:

app:title="@string/EPr_edit_screen_options" />

from here:

<string name="EPr_edit_screen_options">Modifier les options d\'affichage</string>

From this it is tempting to assume that Text values from andoidx...material3 are properly escaped, while xml ui templates expect the escapes to exist in the translation.
Fixing kmp/src/commonMain/composeResources/values-fr/strings.xml to not contain escapes would help I think. Ideally this setting should be set in weblate.

But it is probabaly not enough, as the improper quote also happens in

<string name="sort_due_group">Fin %s</string>
, when the date is today_lowercase.

This is where I get lost in all the combinations, but here are a few screenshots to show when it works and when it fails.

Sample Image Sample Image Sample Image Sample Image Sample Image

@abaker
Copy link
Member

abaker commented Nov 26, 2024

I have started migrating the app to compose multiplatform, and that involves migrating or duplicating some strings in the multiplatform library instead of the android app. And apparently multiplatform resources don't require single or double quotes to be escaped.

I manually fixed these in 2178b4b, I hope this doesn't cause any issues with weblate 🤞

@abaker abaker closed this as completed Nov 26, 2024
@layus
Copy link

layus commented Nov 27, 2024

Thank you so much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants