Commit graph

22 commits

Author SHA1 Message Date
Tao Zhou
5b7d0bd80c
feat: Add language getter for Locale 2023-05-07 16:23:20 -07:00
jkoberg
8ebc12be37 test fs alongside os implementation
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-03-17 11:29:18 +01:00
Jon Snyder
69291164ca add GetTranslations methods to Locale and Domain to allow access to all translations 2020-10-28 16:06:55 -07:00
Jon Snyder
bb276626f3 move common po.go/mo.go code to domain.go
adjust tests to reduce duplication
2020-09-10 13:02:24 -07:00
Chris Vaughn
d791a97f01 call Get & GetC directly instead of using plural=1 for package methods 2020-04-19 14:50:56 -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
4cbf30d337 Make Locale and Po objects serializable. Closes #23 2018-09-07 18:14:38 -03:00
Leonel Quinteros
302c88af99 Add arabic translation test. See #25 2018-08-14 11:01:14 -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
Josef Fröhle
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
1fc8dec04d Rewrite PO headers parsing and handling. Implement correct GNU gettext headers format. Fix tests. Fixes #10 2017-09-08 18:08:56 -03:00
Mattias Lundell
4a52c7709d Add support for multi-line msgid 2017-05-29 11:36:18 +02:00
Leonel Quinteros
0284dca059 Refactoring to make gocyclo happy 2016-08-08 11:36:05 -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
Leonel Quinteros
ea87d40cc2 Add Context (msgctxt) support 2016-06-26 15:43:54 -03:00
Leonel Quinteros
21c6bc86cb Improve test coverage to ~100% 2016-06-26 12:15:08 -03:00
Leonel Quinteros
2c5ca9c0e6 Improve test coverage to ~100% 2016-06-26 11:54:28 -03:00
Leonel Quinteros
d6f4cbb2d5 Add race conditions tests. Fix races. 2016-06-24 17:45:12 -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