-
Notifications
You must be signed in to change notification settings - Fork 94
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
Update i18n.md with information about Unicode isolation marks #1053
Conversation
Provide information about possible formatting issues and how to solve them.
Co-authored-by: KnorpelSenf <shtrog@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much!
@alyavasilyeva just some quick info about what's gonna happen next:
|
Co-authored-by: Roj <rojvv@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Don't we first merge third-party contributions to the main branch and then create PR with translations? |
We used to do that so that you don't have to add a new remote, but I think we can stop doing that because GitHub advertises the changes in this pull request via a remote branch, doesn't it? So you can actually view the diff locally or even merge without cloning the fork. Can you try? |
I don't know what you're talking about. If this is some new GitHub feature, please tell me where I can read about it. |
You never had to fork a fork, you always could just clone the fork and push to the branch. You automatically get write access to a branch of the third-party fork as soon as the branch is used to open a pull request. However, you can actually just keep the main copy of this repository (no forks). You can then follow https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally?platform=linux&tool=cli#modifying-an-inactive-pull-request-locally to see the changes of a pull request. But it seems like those refs are read-only, so perhaps it is not that useful after all. We may want to keep on merging to a temporary branch and performing translations there. |
site/docs/plugins/i18n.md
Outdated
@@ -617,6 +617,20 @@ bot.command("start", async (ctx) => { | |||
}); | |||
``` | |||
|
|||
::: warning Potential Formatting Issues | |||
By default, Fluent uses Unicode isolation marks for interpolations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the first time I've heard this term. This link may help readers who are also new to the topic.
By default, Fluent uses Unicode isolation marks for interpolations. | |
By default, Fluent uses [Unicode isolation](https://github.com/projectfluent/fluent.js/wiki/Unicode-Isolation) marks for interpolations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://github.com/projectfluent/fluent.js/wiki/Unicode-Isolation#what-does-it-look-like
....
Assume the following Fluent message which receives a URL as an argument from the app:# In English privacy-more = Visit {$PRIVACY_URL} to learn more. # In Arabic (courtesy of Google Translate) privacy-more = تفضل بزيارة {$PRIVACY_URL} لمعرفة المزيد.Let the URL end with a forward slash, like so:
{"PRIVACY_URL": "https://www.mozilla.org/privacy/"}Without isolation, the rendered result shows the trailing slash on the wrong side of the URL:
تفضل بزيارة https://www.mozilla.org/privacy/ لمعرفة المزيد. ❌
With isolation, the forward slash is displayed correctly:
تفضل بزيارة https://www.mozilla.org/privacy/ لمعرفة المزيد. ✅
....
IfuseIsolation
is set tofalse
, there's a risk that some translations won't look correctly in bidi scenarios. For RTL languages (Arabic, Hebrew, Persian and more). this happens when interpolated variables are LTR and start or end with weak characters (URLs, book or website titles, citations, Wi-Fi network names, addon names, etc.). For LTR languages, this happens when the interpolated variables are RTL and have leading or trailing weak characters (names and title of all sorts are the most common use-case here).
....
Based on the information above, are we certain it won't cause other issues if we turn off this feature?
Wow, it really works! But it's quite inconvenient to make a clone of the website repository for each third-party contribution. Of course, third-party contributions are quite rare compared to our own, but it's still not convenient. I think it would be better to accept third-party contributions in a temporary branch that translators can easily work with. |
Should we merge this into a temporary branch for the remaining translations? |
@KnorpelSenf I think so. |
Thanks @alyavasilyeva! These changes will be merged via #1058 after translation is done. |
… (#1058) Co-authored-by: Aliya Vasilyeva <aliyavws@gmail.com> Co-authored-by: Roj <rojvv@icloud.com> Co-authored-by: Qz <quadratz@proton.me> Co-authored-by: Nazar Antoniuk <antoniuk.nazar09@gmail.com> Co-authored-by: Acer <> Co-authored-by: E5F1AC <150493299+dzikrl@users.noreply.github.com> Co-authored-by: Habemuscode <{ID}+{username}@users.noreply.github.com>
Provide information about possible formatting issues when using placeables and how to solve them.
Context: grammyjs/i18n#47