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

i18n: Remove XML entity for docs URL #1052

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

acolomb
Copy link
Contributor

@acolomb acolomb commented Dec 2, 2023

The &folder_ignore_delete_docs_url; entity is used to avoid repeating the URL verbatim in translations strings. While this is a good approach in principle, it does come with a couple of drawbacks:

  1. Automated processing via XSLT (such as i18n: Indirect string-array declarations through arrays.xml #1051) will resolve the entity refs automatically, this cannot be easily avoided.

  2. It is a one-off pattern, used only for this URL. All others are part of the translation strings verbatim. If used stand-alone, they are marked translatable="false".

  3. It is still error-prone to typos when making the translation. If the URL is screwed up, it won't get the user to its target. But if the entity reference is misspelled, there will be nothing to look at probably.

Any possible benefits don't outweigh these and the added complexity, thus get rid of the entity references (using a simple XSLT transform).

The &folder_ignore_delete_docs_url; entity is used to avoid repeating
the URL verbatim in translations strings.  While this is a good
approach in principle, it does come with a couple of drawbacks:

1. Automated processing via XSLT will resolve the entity refs
automatically, this cannot be easily avoided.

2. It is a one-off pattern, used only for this URL.  All others are
part of the translation strings verbatim.  If used stand-alone, they
are marked translatable="false".

3. It is still error-prone to typos when making the translation.  If
the URL is screwed up, it won't get the user to its target.  But if
the entity reference is misspelled, there will be nothing to look at
probably.

Any possible benefits don't outweigh these and the added complexity,
thus get rid of the entity references (using a simple XSLT transform).
@acolomb acolomb changed the title i18n: Remove XML entity for docs URL. i18n: Remove XML entity for docs URL Dec 2, 2023
@acolomb
Copy link
Contributor Author

acolomb commented Dec 2, 2023

Note that this will lead to conflicts when merging #1033 in advance. I suggest the following merge order, and will fix any upcoming conflicts ASAP (already done locally).

  1. i18n: Lost translations from before Weblate reset #1053
  2. Translations update from Hosted Weblate #1033
  3. i18n: Indirect string-array declarations through arrays.xml #1051
  4. This, i18n: Remove XML entity for docs URL #1052

And as of this writing, Hosted Weblate has some troubles with losing the git remote repo connection every night, leading to alerts. I've contacted their support about it, trying not to touch anything in the meantime so they can troubleshoot.

@acolomb
Copy link
Contributor Author

acolomb commented Dec 4, 2023

Weblate issue should be fixed.

@Catfriend1 Catfriend1 merged commit 5025564 into Catfriend1:main Dec 4, 2023
@acolomb acolomb deleted the fork/resolve-xml-entity branch December 5, 2023 07:57
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.

2 participants