-
-
Notifications
You must be signed in to change notification settings - Fork 155
Add locales (#8107) #8153
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
Open
iHiD
wants to merge
71
commits into
main
Choose a base branch
from
i18n
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add locales (#8107) #8153
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9554fc5 to
74bedc0
Compare
2d2270d to
623b01a
Compare
* Add basic translations code/logic * WIP * Update migrations * Update migrations * Add i18n js backend file loader (#8099) * Start work on things * Add approval of LLM version * Improve UI * Add more endpoints * Return data from API * Fix * Improve searching * Add LLM verification * Tweaks * Add localization generating flow * Reword lots * Add locales as URL params * Fix default vs constraint * Fix Zeitwerk * Redirect logged-in users to correct locale * Check routing * Redirect users to their selected locale * Correctly render things * Fix rebase * Add locales to footer * Tidy * Improve locale support * Improve locale support * WIP * Rename migration * Further progress * Add test * Add test * Add tests * Rework prompts * Sync things up * Add Translation Placeholder (#8149) A placeholder that shows a pending state, then shows the newly generated translation. * Add React Translation UI pages * Fix bad filename * Fix LLM verification * Add title to originals * Fix serialzier * Remove stray file --------- Co-authored-by: Aron Demeter <66035744+dem4ron@users.noreply.github.com> Co-authored-by: dem4ron <demaaron88@gmail.com>
* Start making a script * Working git extractor * Better prompt, tsx only * Remove unused stuff * Refactor code * Parse output * Tweak prompt a bit
* Aggregate js translations * Remove namespaces * Remove namespaces from Trans components * Add missing translations, remove namespaces, use correct hook
* WIP * Amp Improvemnts (#8186) * Amp Improvemnts * Fix glossary entry proposal command signatures - Update Approve and Reject commands to accept proposal directly instead of glossary_entry - Fix controller to pass @proposal to Approve/Reject commands - Update test expectations to match corrected command signatures - Resolves logical inconsistency where commands tried to find proposals through glossary entries Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-b0f4fc46-b5d8-47f8-899f-b9cab8f38b5f --------- Co-authored-by: Amp <amp@ampcode.com> * Add Glossary entries UI (#8189) * Add Glossary entries UI * Fix types * Tiny adjustment * Add i18n glossary and reserved terms files - Add i18n_GLOSSARY.tsv with 45 key Exercism terms and translation guidance - Add i18n_RESERVED.tsv with brand names and technical terms that should not be translated - Update .gitignore to exclude .claude/ directory These files will help ensure consistent translations across languages by providing clear guidance on how terms should be translated and which terms should remain in English. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add additional terms to i18n glossary Added 23 more important terms including: - Organization terms: open-source, not-for-profit, donate, donation, supporter - Membership terms: Insiders, perks, favorites, member, premium - Programming terms: coding, programming, developer, code - Payment terms: subscription, monthly, recurring, payment - Achievement terms: level, tier, reward, achievement, milestone These additions provide more comprehensive translation guidance for commonly used Exercism terminology. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Sort glossary and reserved terms alphabetically Both TSV files are now sorted alphabetically by the first column (term name) while preserving the header row. This makes it easier to find and maintain terms. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix typo * Add propose-term modal (#8193) * Start adding modal * Add modal * Load terms into db, use that in react_helper * Add terms to i18n glossary Added: administrator, argument, bootcamp, Contribute, Discover, function, generator, Learn, method, parameter, queue Also removed duplicate tenses and plurals (submitted, submitting, solutions) as they don't add value to the glossary. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add glossary translation infrastructure and Hungarian translations - Created instructions for LLMs to generate glossary translations (scripts/llm_instructions/create_glossary_file.md) - Generated Hungarian glossary translations (i18n/glossary/hu.tsv) with 82 terms - Created import script (scripts/import_glossary_translations.rb) to load translations into database - Script parses TSV files and uses Localization::GlossaryEntry::Create service - Successfully imported all Hungarian translations to database - Fixed debug statement in glossary_entries_list helper 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add create method to API::Localization::GlossaryEntriesController - Add create action that proxies to Localization::GlossaryEntry::Create - Accept parameters via params[:glossary_entry] for locale, term, translation, and llm_instructions - Return empty JSON with 201 status on success - Add corresponding route and tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Add German, Dutch, and Polish glossary translations and reorganize i18n files - Created glossary translations for German (de), Dutch (nl), and Polish (pl) - Each translation file contains all 82 terms with appropriate translations - Successfully imported all translations to database (328 total entries) - Moved base glossary and reserved words files to i18n/ folder with clearer names: - i18n_GLOSSARY.tsv -> i18n/glossary_base.tsv - i18n_RESERVED.tsv -> i18n/reserved_words.tsv - Updated scripts to reference new file locations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Glossary-UI adjustments (#8202) * Adjust table * Glossary show tweaks * Comment out uuid * Fix schema * Update glossary entry proposal to set status to :proposed - Modified CreateModification to set glossary_entry status to :proposed - Added destroy method to GlossaryEntriesController for deletion proposals - Fixed tests to match updated command signatures and behaviors - Added missing existing_locales method to TranslateToAllLocales - Fixed test isolation issues and made tests more robust 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fix test isolation issues in localization command tests - Replace define_singleton_method with proper Mocha stubs to fix test isolation - Add explicit stubs only in tests that don't verify LLM calls - Add ordering to glossary entry search for consistent results - All localization command tests now pass reliably 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Edit mode tweaks * Clean up glossary-entries `show` * Refactor * No glossary entries found * Add LocaleSelect * Add All option * Add min width * Tweaks * Update GlossaryEntryProposal commands to manage status and add Search tests - Update GlossaryEntryProposal::Approve to set glossary_entry status to :checked - Update GlossaryEntryProposal::Reject to set status to :unchecked when no pending proposals remain - Add locale parameter support to GlossaryEntry::Search - Create comprehensive test suite for GlossaryEntry::Search following Original::SearchTest pattern - Update assembler to pass filter_locale parameter to Search command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Tweak proposal modal, and LocaleSelect-or (#8204) * Tweaks * Add guards, API next action, and fix method naming for glossary entry management - Add may_manage_translation_proposals? method to User model (reputation > 20) - Add guards to GlossaryEntryProposal commands (Approve, Reject, UpdateValue) - Implement next action in API::Localization::GlossaryEntriesController - Add route and comprehensive tests for API next action - Fix locale handling in GlossaryEntry::Search (convert symbols to strings) - Update tests to use data.update! instead of stubs for translator_locales - Add translator edit view and controller actions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Aron Demeter <66035744+dem4ron@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: dem4ron <demaaron88@gmail.com>
* Add a language selector modal * Tiny changes * Remove logging, disable debugging * Refactor * Adjust things to 3 scenarios * Use default buttons
* Describe yaml translation * Improve script * Improve script related stuff * Fix stupid prompt escaping * Adjust script * Add description to copy * Remove weird stuff * Move descriptions to one place
- Add ensure_translator_locale before_action to glossary_entries, originals, and dashboard controllers - Redirect to new_localization_translator_path when user has no translator_locales - Add comprehensive tests for all three controllers - Ensures users must set their translator locales before accessing localization features 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Allow filtering out specific glossary entries by their IDs. This enables skipping already processed entries when iterating through results. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Search now includes pending addition proposals alongside existing glossary entries. Proposals are shown when no matching glossary entry exists for the same term+locale combination, ensuring unique results. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Updated Search command to return results in random order using database RAND() function. Modified tests to use .sort where order is not being explicitly tested. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Updated the Search command and all related components to use UUIDs instead of database IDs for exclusion. The parameter is now called exclude_uuids and filters by UUID values. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
* Status tag tweaks, css tweaks * More Tweaks * Disable Propose new term
* Tweaks * Add tests * Tweaks
* Add toasts between steps * Add skip toasts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.