Repository navigation
feat(goi18n): translate the messages by a bundle of go-i18n - #82
Merged
Merged
Conversation
The module github.com/insei/valigo/integrations/goi18n: Source is a
translator.Source of a bundle, the messages use the named parameters of
the rules, {{.max}}, or the format verbs of the keys, the plural forms
are chosen by the first integer argument, the fallback of go-i18n to
another language is left to the next sources. Messages exports the
built-in messages of a language.
Contributor
Benchmark diff:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 39 40 +1
Lines 1806 1865 +59
=========================================
+ Hits 1806 1865 +59 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
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.
The module
github.com/insei/valigo/integrations/goi18nover the chain of sources of #81:{{.max}},{{.field}}) or the format verbs of the key (%d); the plural forms by the first integer argument.goi18n.Messages(lang)exports the built-in messages with their plural forms — added back to a bundle they translate like the built-in ones (tested).Docs: Translations → Sources of translations, the page Integrations → go-i18n with a checked program. CI, dependabot and the modules list have the module; 100% coverage.
The module needs the sources of the core, unreleased: its tag goes with v0.2.0 of the core.