-
-
Notifications
You must be signed in to change notification settings - Fork 185
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 - Add a way to localize teams' names. #568
Comments
@borisschapira short term, can’t we just have buttons with local wording on the buttons but using the English categories to filter? Though I’m guessing that currently the buttons are dynamically generated so this would mean hard coding the team names? Not ideal but also I wouldn’t expect to add new teams that often so maybe acceptable... |
Short term, I've added "(noms anglais)", aka "(English names)" to the "Filter by teams:" translation, because the buttons are generated from |
Yes but could just replace this: {% for id, team in config.teams.items() %}
<button class="{{ id }}" type="button">{{ team.name }}</button>
{% endfor %} with this: <button class="analysts" type="button">Analystes</button>
<button class="authors" type="button">Auteurs</button>
<button class="brainstormers" type="button">Brainstormers</button>
....etc. Hardcoding as a say, but maybe sufficient - at least in short term |
This presents a risk if a new team is added but if it's okay with everyone, I can do it that way. |
Agreed but think that's relatively unlikely and think it's far friendlier to French visitors so I say go for it for now. Leave this issue open for longer term options. Also doing this for now will also give us the translations to use for when (if?) we do implement a better option. Which might be a lookup table in the Contributors chapter with fallback to English. @mikegeyser any thoughts on this? |
I think it would make sense for the base template to read the team names from a variable, and then each specific translation can override the variables in the contributors page. Something similar to how we set metadata in the Edit: Something like this:
(The above is just pseudocode, I haven't run it.) |
Yes that’s what I was thinking. |
With fallback to English team names if the dictionary is not populated. Fixes HTTPArchive#568
* Localized Team Names With fallback to English team names if the dictionary is not populated. Fixes #568 * Using a null coalescing operator instead of duplicating HTML markup. Thanks @mikegeyser
* FR - Language-specific templates part I * Adding pluralization of the word "comment" to the EN version * Adding French to supported languages * Adding myself to contributors (assuming I join the translators team) * Removing inline style - Does not conform with the CSP - Is useless with the CSS styling * Change logic for comment pluralization Show the right word according to the number of comment. * Translating a string * Update src/config/2019.json Co-Authored-By: Barry Pollard <[email protected]> * Update src/config/2019.json Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Adding some missing translation on alternatives * Add FR translation for Contributors template * Add FR translation for Index template * Hardcode Contributors's team names in FR According to #568 (comment) * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Localize Breadcrumb's name * Fixing a missed "on" => "sur" * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Improving alternatives on avatars * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Improving wording on "one's website" to "site web de…" * Typofix Web Almanac * FR - Localized Team Names With fallback to English team names if the dictionary is not populated. related to #569 * Using a null coalescing operator instead of duplicating HTML markup. Thanks @mikegeyser * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/chapter.html Co-Authored-By: Barry Pollard <[email protected]>
* FR - Language-specific templates part I * Adding pluralization of the word "comment" to the EN version * Adding French to supported languages * Adding myself to contributors (assuming I join the translators team) * Removing inline style - Does not conform with the CSP - Is useless with the CSS styling * Change logic for comment pluralization Show the right word according to the number of comment. * Translating a string * Update src/config/2019.json Co-Authored-By: Barry Pollard <[email protected]> * Update src/config/2019.json Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Adding some missing translation on alternatives * Add FR translation for Contributors template * Add FR translation for Index template * Hardcode Contributors's team names in FR According to HTTPArchive/almanac.httparchive.org#568 (comment) * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Localize Breadcrumb's name * Fixing a missed "on" => "sur" * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Improving alternatives on avatars * Update src/templates/fr/2019/contributors.html Co-Authored-By: Barry Pollard <[email protected]> * Improving wording on "one's website" to "site web de…" * Typofix Web Almanac * FR - Localized Team Names With fallback to English team names if the dictionary is not populated. related to #569 * Using a null coalescing operator instead of duplicating HTML markup. Thanks @mikegeyser * Update src/templates/fr/2019/base_chapter.html Co-Authored-By: Barry Pollard <[email protected]> * Update src/templates/fr/2019/chapter.html Co-Authored-By: Barry Pollard <[email protected]>
Current team names (Analysts, Authors, Brainstormers, Designers…) are use on the Contributors page to filter people. We should think about a way to localize theses teams' names.
The text was updated successfully, but these errors were encountered: