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 CDATA #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove CDATA #8

wants to merge 1 commit into from

Conversation

madjuju
Copy link

@madjuju madjuju commented Apr 7, 2021

No description provided.

@mariohahn mariohahn requested a review from FlowMo7 April 7, 2021 14:13
Copy link
Member

@FlowMo7 FlowMo7 left a comment

Choose a reason for hiding this comment

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

What would the use-case be to require the CDATA to be removed from the android string resources altogether?

The CDATA tag helps us to not have to escape special characters which would be interpreted by the XML parser within the string, so that while inserting translations into the spreadsheet, one would not need to escape e.g. < or > manually.

Is your use-case that you have those special characters already escaped manually in the respective localization sheet?

As this would (imho) be a breaking change, as all already existing localization sheets would need to be updated to manually escape those special characters, I would more see this as maybe a configuration option / feature flag, instead of changing the default behavior.

@madjuju
Copy link
Author

madjuju commented Apr 7, 2021

@FlowMo7 I don't have a problem with special characters, except maybe for &
The wish to remove CDATA is that after importing into android studio the language files are unreadable by the developer team.
I maintain 25 applications in 6 languages
If you can put this option it would be very very good.

@madjuju
Copy link
Author

madjuju commented Apr 7, 2021

BEFORE
image

AFTER
image

@mariohahn
Copy link
Collaborator

But if you would have a language with the need of escaping characters, you would run into an issue without the CDATA. It the google sheet not the better place to check the Strings anyway?

If you would really like to have it like that please send me a PR, where you can set Remove_CDATA as a parameter, because as @FlowMo7 mentioned, for us, it is a very important "feature" and it would be a breaking change.

@madjuju
Copy link
Author

madjuju commented Apr 7, 2021

@mariohahn I am not competent enough to code this feature

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