-
Notifications
You must be signed in to change notification settings - Fork 521
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
[BUG]: CDATA causes issues with Translatewiki importing #5357
Labels
bug
End user-perceivable behaviors which are not desirable.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Milestone
Comments
BenHenning
added
bug
End user-perceivable behaviors which are not desirable.
triage needed
labels
Mar 12, 2024
@adhiamboperes I think you're looking into this. |
BenHenning
modified the milestones:
0.13 Release Blockers (Beta "Early Access"),
1.0 Global availability
Mar 12, 2024
adhiamboperes
added
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
and removed
triage needed
labels
Mar 12, 2024
github-project-automation
bot
moved this to Todo
in [Team] Developer Workflow & Infrastructure - Android
Mar 12, 2024
6 tasks
BenHenning
added a commit
that referenced
this issue
Mar 15, 2024
## Explanation Fixes #5357 This PR removes all ``CDATA`` declarations in the translatable ``strings.xml`` file and instead escapes all necessary characters: < and > (& didn't need to be escaped since no strings use that character at the moment). This is needed because Translatewiki doesn't seem to extract the HTML within the CDATA declaration correctly, so it may not be translated (some existing strings were never translated, and per #5274 the latest FAQ changes aren't being processed correctly (leading to empty translation strings being submitted). This PR also introduces a regex check + test to ensure that CDATA isn't used anymore in strings. ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only See video for a demonstration on all of the affected strings still rendering correctly (as far as I can tell) after this change: https://github.com/oppia/oppia-android/assets/12983742/b1102d28-d3a5-4266-969c-d7d84f8d5d38
github-project-automation
bot
moved this from Todo
to Done
in [Team] Developer Workflow & Infrastructure - Android
Mar 15, 2024
adhiamboperes
added a commit
that referenced
this issue
May 22, 2024
github-project-automation
bot
moved this from Done
to In Progress
in [Team] Developer Workflow & Infrastructure - Android
May 26, 2024
github-project-automation
bot
moved this from In Progress
to Done
in [Team] Developer Workflow & Infrastructure - Android
May 26, 2024
github-project-automation
bot
moved this from Done
to In Progress
in [Team] Developer Workflow & Infrastructure - Android
May 26, 2024
The original PR fixing this has been reverted, so this work needs to happen again. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
End user-perceivable behaviors which are not desirable.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Medium
The means to find the solution is clear, but it isn't at good-first-issue level yet.
Describe the bug
As described in https://github.com/oppia/oppia-android/pull/5274/files#r1517940307 and observed in that PR, CDATA in strings causes one of three Translatewiki behaviors:
Steps To Reproduce
See above.
Expected Behavior
All strings should be translatable via Translatwiki.
Screenshots/Videos
No response
What device/emulator are you using?
No response
Which Android version is your device/emulator running?
No response
Which version of the Oppia Android app are you using?
No response
Additional Context
I think this means we cannot use CDATA anymore and instead should prohibit it via a regex check. Existing CDATA strings will need to be escaped, instead (e.g. HTML tag markers will need to be replaced with '>' and '<').
The text was updated successfully, but these errors were encountered: