🚀 Biggest release so far!
- 👍 Introducing MO files support! Thanks to @Dexus for the implementation.
- 📦 We have changed the way to parse the plural expressions by implementing our own plural expression parser. Thanks to @Dexus again for the hard work on this! Now this package has no external dependencies, which was a goal to achieve.
- 🆕 New
Localeobjects to use any translation source backend (non-gettext).
Poobjects now can be serialized. They implement the
encoding.BinaryUnmarshalerinterfaces. This way they can be cached as
byteto avoid translation file parsing in concurrent environments.
- ➕ Added support for Go Modules. Now a project using Go Modules can import this package as a module outside the GOPATH.
🚀 This release fixes an issue that made
GetNCuse always the
"default"context instead of looking into the package configuration.
🔨 It also includes a refactoring of the package configuration that allows to be used in multiple concurrent goroutines without having data races.
🚀 As these 2 changes may conflict with packages using it, by assuming the "default" context on the first, or by introducing deadlocks by the second, we're increasing the minor version number for this release to indicate possible backwards compatibility breaks.
Starting on this version, we now have Pull Requests and Issues templates to fill in before creating any of these to help contributors provide all necessary information.
🛠 Relevant issues fixed
- 📦 #14 GetN and GetNC don't honor domain package variable set by SetDomain()
🚀 Small release to include the following commit:
- 🖨 Unify fmt.Sprintf behaviour on Po and Locale
🌐 This changes how the Locale object falls back when a translation is not found to behave the same as the Po object and use
fmt.Sprintfonly when variables are provided.
- Issue #9 : Handle empty translation strings as untranslated as defined in https://www.gnu.org/software/gettext/manual/html_node/Untranslated-Entries.html
🚀 Small release addressing 2 main changes that break backwards compatibility:
Pull Request: use kinako instead of anko #7
🔄 Changes the backend used to evaluate the plural forms. From anko to kinako.
🚚 Issue: Remove plural default in Po Gets #8
0️⃣ Plural methods
GetNCnow return the default singular or plural by checking the
nparam as described in the issue.
👕 Several code changes to improve goreportcard.com results and to make golint and govet happy.
There are no changes on the API so backwards compatibility with v1.1.0 is ensured.
API compatibility break from version 1.0
nparameter on plural functions now have different meaning to make them Gettext compliant using
Plural-Formsheader formula definition
🆕 New features
- ➕ Added parsing for PO file headers
- ➕ Added support for
- Plural functions now are gettext compliant
- ➕ Added support for multiline strings