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

Remove unexpected quote escaping in string resource #1292

Merged
merged 3 commits into from
Apr 21, 2024

Conversation

SimonMarquis
Copy link
Contributor

Screenshot_20240420-154012

Copy link
Collaborator

@martinbonnin martinbonnin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@SimonMarquis
Copy link
Contributor Author

Oh, interesting.

/home/runner/work/Confetti/Confetti/androidApp/src/main/res/values/strings.xml:36:4: Failed to flatten XML for resource 'sign_in_for_bookmarks' with error: Invalid unicode escape sequence in string
"{str}"

Not sure what's wrong. Wrapping in double quotes would probably fix the issue. But testing this is kinda tricky on a smartphone 😅

@@ -31,7 +31,7 @@
<string name="oops">Oops something went wrong</string>
<string name="retry">Retry</string>
<string name="update_wear">Update Wear Theme</string>
<string name="sign_in_for_bookmarks">In order to save your bookmarks, you\'ll need to sign in.</string>
<string name="sign_in_for_bookmarks">In order to save your bookmarks, you'll need to sign in.</string>
Copy link
Collaborator

@martinbonnin martinbonnin Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this one works without the \ but the other one needs it...

@joreilly joreilly merged commit 0d07a1b into joreilly:main Apr 21, 2024
5 checks passed
@SimonMarquis SimonMarquis deleted the SimonMarquis-patch-1 branch April 21, 2024 09:29
@SimonMarquis
Copy link
Contributor Author

@martinbonnin @joreilly here are some related issues:

that brings up the question of why are we trying to mirror string resources in androidApp/src/main/res/values/strings.xml since they don't override the ones defined in shared/src/commonMain/composeResources/values/strings.xml?

It seems like resources that are directly used in the shared module can't be modified by regular Android string resources. What do you think about declaring those only in the shared module (with the -fr alternatives)?

<resources>
    <string name="sessions">Sessions</string>
    <string name="oops">Oops something went wrong</string>
    <string name="retry">Retry</string>
    <string name="sign_in_for_bookmarks">In order to save your bookmarks, you'll need to sign in.</string>
    <string name="cancel">CANCEL</string>
    <string name="sign_in">SIGN IN</string>
</resources>

@joreilly
Copy link
Owner

Hmm, I think I might have been in process of transitioning those strings to shared code which is why they're probably still duplicated. Will take a look soon at cleaning that up.

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

Successfully merging this pull request may close these issues.

None yet

3 participants