Skip to content

Allow configuring translation backend in yaml#580

Merged
glebm merged 1 commit into
glebm:mainfrom
Jetbuilt:configurable-translation-backend
Jun 10, 2024
Merged

Allow configuring translation backend in yaml#580
glebm merged 1 commit into
glebm:mainfrom
Jetbuilt:configurable-translation-backend

Conversation

@jaredmoody
Copy link
Copy Markdown
Contributor

@jaredmoody jaredmoody commented May 24, 2024

I also tidied up the README to be a little more concise and added examples of backend configuration under each translation backend configuration section.

LMK if you would like any changes.

@jaredmoody jaredmoody force-pushed the configurable-translation-backend branch 2 times, most recently from 613a540 to 3e59981 Compare May 24, 2024 19:57
@davidwessman davidwessman linked an issue May 25, 2024 that may be closed by this pull request
@davidwessman davidwessman changed the title Closes #575 - Allow configuring translation backend in yaml Allow configuring translation backend in yaml May 25, 2024
@davidwessman
Copy link
Copy Markdown
Collaborator

Fixes #575

@davidwessman davidwessman requested a review from glebm May 25, 2024 18:11
Comment thread lib/i18n/tasks/command/commands/missing.rb Outdated
@jaredmoody jaredmoody marked this pull request as draft May 28, 2024 16:37
@jaredmoody
Copy link
Copy Markdown
Contributor Author

Just posted #581 which is a prerequisite to this PR.

@jaredmoody jaredmoody force-pushed the configurable-translation-backend branch from 3e59981 to 903d26d Compare June 5, 2024 23:07
@jaredmoody jaredmoody marked this pull request as ready for review June 5, 2024 23:07
@jaredmoody
Copy link
Copy Markdown
Contributor Author

By placing the backend default in the suggested location, there's now a Metrics/AbcSize violation on that method. LMK how you would like to resolve.

@glebm
Copy link
Copy Markdown
Owner

glebm commented Jun 8, 2024

That's fine, please disable Metrics/AbcSize for that method

@glebm
Copy link
Copy Markdown
Owner

glebm commented Jun 8, 2024

Looks good to me! Disable the rubocop warning and I'll merge 👍

Comment thread lib/i18n/tasks/configuration.rb Outdated
- Use the Enum option parser for the translation_backend to prevent fallback to `en`
- Add `allow_blank` argument to the Enum option parser. We want -b to be optional so we can use the config file backend if present
- Update translation strings for translation_backend CLI argument to list all options
- Error when invalid backend is specified
- Retain :google backend default, specify in `I18n::Tasks::Configuration#translation_config`
- Tidy README to remove duplication and show backend configuration via config file
@jaredmoody jaredmoody force-pushed the configurable-translation-backend branch from dec2290 to ebe6e02 Compare June 10, 2024 16:52
@glebm glebm merged commit 2145066 into glebm:main Jun 10, 2024
@glebm
Copy link
Copy Markdown
Owner

glebm commented Jun 10, 2024

Thank you! 🎉

@jaredmoody jaredmoody deleted the configurable-translation-backend branch June 10, 2024 17:51
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.

Configure translation backend in i18n-tasks.yml

3 participants