-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Move hardcoded links from translation to templates #29500
base: main
Are you sure you want to change the base?
Conversation
options/locale/locale_en-US.ini
Outdated
@@ -176,7 +176,7 @@ string.desc = Z - A | |||
|
|||
[error] | |||
occurred = An error occurred | |||
report_message = If you believe that this is a Gitea bug, please search for issues on <a href="https://github.com/go-gitea/gitea/issues" target="_blank">GitHub</a> or open a new issue if necessary. | |||
report_message = If you believe that this is a Gitea bug, please search for issues on %[1]sGitHub%[2]s or open a new issue if necessary. |
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.
Why not the whole a link? GitHub
has no translation for other languages.
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.
See #29500 (comment) why this is a bad idea.
The only issue with whole links is that the translator looses context and just sees |
Yeah, I've thought about that as well. |
I think the last change with full links should be reverted. A translator wouldn't know what to do with |
One more question, what if we need different links for different languages? I mean I know we never did that, and most docs missed localization. But when we want to use a different link for a specific language, it is easy to apply or revert it: just update the translations on Crowdin instead of submitting a PR to update golang or template codes. |
Sorry but I do not think it could do so directly at the moment. All existing non-English translations would break, lead to incorrect template sentences. The reason is the same: these keys/values would never be updated at crowdin side. Unless this could be done first: #27700 (comment) , or use a new key for them. |
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.
@lunny I'll let you discuss this with @silverwind. Tell me once you've reached an agreement |
Hmm… Do we want to support hypotheticals? |
I don't understand, aren't outdated translations automatically invalidated and removed from the active pool of "having a translation"? I don't see how this blocks this PR? |
IIRC no. So that's the real problem. See #27700 (comment), at that time, the "outdated" didn't get "invalidated" or "removed" |
Now, we can more easily change links as changing a link no longer invalidates all translations in other languages.