Ben Sarah Golightly
75a1fb9b04
Add variants of Get functions with existence checks
...
Currently, a translation that doesn't exist just defaults to the
passed message ID.
It can be helpful to be able to catch these missing cases e.g. to
save to a log.
This PR implements variants ending in 'E' like GetE, GetNE.
This wasn't implemented at the package-level scope, because for
quick translations like that the extra flexibility probably isn't
needed.
2020-07-23 00:28:56 +01:00
Chris Vaughn
192fa01364
call Translation.Get & GetC directly instead of calling Translation.GetN with default of plural=1
...
* add correct Arabic pluralform rules to test
2020-04-16 17:29:45 -05:00
Leonel Quinteros
823ca32c7a
Fallback Po's missing plural translation using plural forms when available. Use western rule n==1 convention only on Locale object without Domain. Fixes #34
2019-10-21 14:43:48 -03:00
Leonel Quinteros
0e382cfe26
First implementation of CLI tool
2019-02-15 15:20:42 -03:00
Leonel Quinteros
4cbf30d337
Make Locale and Po objects serializable. Closes #23
2018-09-07 18:14:38 -03:00
Leonel Quinteros
8e9d9df2e2
Allow Locale backends to work with different Translator sources using AddTranslator method for Locale object. Fixes #22
2018-07-05 11:37:25 -03:00
4172a9c4a7
Update commits
...
Signed-off-by: Josef Fröhle <froehle@b1-systems.de >
2018-03-26 20:47:41 +02:00
cd46239477
Create MO parser
...
Refactored a bit too, so we can use interfaces to take Mo and Po files
added fixtures
found that the parser for Po files have a bug... but it works... so not touched
2018-03-24 22:44:37 +01:00
Leonel Quinteros
92b69ffa4c
Honor package domain in Locale methods. Increase test coverage.
2018-02-14 12:04:47 -03:00
Leonel Quinteros
7d86bb66fe
Unify fmt.Sprintf behaviour on Po and Locale
2017-11-02 10:21:20 -03:00
Leonel Quinteros
4b94e83723
Properly handle singular vs plural defaults for untranslated strings. Fixes #9
2017-09-01 13:28:51 -03:00
Leonel Quinteros
74daa24696
Plural-Forms formula support. Headers parsing. Multiline strings support.
2016-07-15 19:04:59 -03:00
Leonel Quinteros
ad380b8ede
Fix Locale.findPO to support language code simplification on LC_MESSAGES dir.
2016-07-01 11:21:13 -03:00
David Mugnai
8a0f825cf4
added support for .po files stored in a LC_MESSAGES subdir
2016-07-01 15:41:56 +02:00
Leonel Quinteros
ea87d40cc2
Add Context (msgctxt) support
2016-06-26 15:43:54 -03:00
Leonel Quinteros
d6f4cbb2d5
Add race conditions tests. Fix races.
2016-06-24 17:45:12 -03:00
Leonel Quinteros
25256ca6c0
Improved docs
2016-06-24 17:09:34 -03:00
Leonel Quinteros
2d31bca56e
Improved docs
2016-06-24 17:04:46 -03:00
Leonel Quinteros
982d029c78
Add support for plural forms
2016-06-23 11:41:38 -03:00
Leonel Quinteros
9107e9b75a
Initial import
2016-06-19 19:36:33 -03:00