Skip to content

Conversation

@LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented Jul 24, 2025

Gets things to a stage where all strings are - in theory - l10n-able. Next steps will be improving the l10n experience, and further optimising which strings we ship to the client.

The added README is a good source for some of what's going on here.

@LeoMcA LeoMcA requested review from a team and mdn-bot as code owners July 24, 2025 18:29
@github-actions
Copy link
Contributor

github-actions bot commented Jul 24, 2025

08dd03d was deployed to: https://fred-pr452.review.mdn.allizom.net/

@caugner caugner marked this pull request as draft August 19, 2025 11:35
@caugner
Copy link
Contributor

caugner commented Aug 19, 2025

Converted to draft, as it has merge conflicts.

@LeoMcA LeoMcA marked this pull request as ready for review August 26, 2025 08:21
@LeoMcA LeoMcA requested a review from caugner August 26, 2025 08:21
@LeoMcA LeoMcA mentioned this pull request Aug 26, 2025
Copy link

@bcolsson bcolsson left a comment

Choose a reason for hiding this comment

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

I understand that more work is happening around localization at some point in the future, but I noticed some major issues that could cause headaches down the road, so adding comments. I'd suggest making changes before asking localizers to translate these. (If the expectation is to use Pontoon, then the complicated Fluent logic wouldn't be supported well either.)

footer-copyright = Portions of this content are ©1998–{ $year } by individual mozilla.org contributors. Content available under <a data-l10n-name="cc">a Creative Commons license</a>.
search-modal-site-search = Site search for <em>{ $query }</em>
site-search-search-stats = Found { $results } documents.
site-search-suggestion-matches =
Copy link

Choose a reason for hiding this comment

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

While this is technically valid fluent it's best to avoid this pattern. This should be two strings - otherwise you can't guarantee that all patterns will have translations (reference).

Typically you want to remove the logic from the strings themselves, so it's preferable to have a -greaterthan and a -equals string then have the logic happening outside of fluent to choose the correct string.

Comment on lines +77 to +104
compat-support-flags =
{ NUMBER($has_added) ->
[one] From version { $version_added }
*[other] { "" }
}{ $has_last ->
[one]
{ NUMBER($has_added) ->
*[zero] Until { $versionLast } users
[one] { " " }until { $versionLast } users
}
*[zero]
{ NUMBER($has_added) ->
*[zero] Users
[one] { " " }users
}
}
{ " " }must explicitly set the <code data-l10n-name="name">{ $flag_name }</code>{ " " }
{ $flag_type ->
*[preference] preference
[runtime_flag] runtime flag
}{ NUMBER($has_value) ->
[one] { " " }to <code data-l10n-name="value">{ $flag_value }</code>
*[other] { "" }
}{ "." }
{ $flag_type ->
[preference] To change preferences in { $browser_name }, visit { $browser_pref_url }.
*[other] { "" }
}
Copy link

Choose a reason for hiding this comment

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

This is untranslatable. Even in English I barely understand what a final string would look like, so compounding translations with different word order, you'll have a very difficult time to get something comprehensible out of this.

This should be split into multiple strings. E.g.
string-a = From version { version }
string-b = From version { version } until {version} users
ETc.

compat-experimental = Experimental
compat-nonstandard = Non-standard
compat-no = No
compat-support-full = Full support
Copy link

Choose a reason for hiding this comment

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

I'm finding this and multiple other strings with the exact same ID. You'll need to find a way to avoid duplication.

compat-legend-preview = In development. Supported in a pre-release version.
compat-legend-no = { compat-support-no }
compat-legend-unknown = Compatibility unknown
compat-legend-experimental = { compat-experimental }. Expect behavior to change in the future.
Copy link

Choose a reason for hiding this comment

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

I sort of understand why you want to use a reference here and below, but there is the potential for localization issues here. It'd be simpler for localizers to just have the word instead of a message reference.

@caugner caugner removed the request for review from a team October 22, 2025 10:20
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.

4 participants