2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Frans de Jonge
b8b6abe4d4
[fix] GetText: Support Arabic plurals (#5517)
Fixes <https://github.com/koreader/koreader/issues/5516>.

Cf. <https://github.com/koreader/koreader/pull/5515>.
2019-10-21 18:29:40 +02:00
Frans de Jonge
621f36b4a9
[fix] GetText: guard against empty strings in translation (#5301)
Fixes <https://github.com/koreader/koreader/issues/5293>.
2019-09-01 16:31:37 +02:00
Frans de Jonge
ece884a368
[fix, CI] Forgot to run luacheck (#5261)
My bad.
2019-08-25 13:23:49 +02:00
Frans de Jonge
3ab51b1f85
[spec] Test all gettext codepaths & support language with no plurals (#5260) 2019-08-25 12:39:42 +02:00
Frans de Jonge
2c555830f9
[feat, i18n] Implement ngettext (#5257)
Fixes <https://github.com/koreader/koreader/issues/5249>.

See https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html and https://www.gnu.org/software/gettext/manual/html_node/Translating-plural-forms.html for more information.

Usage:
```lua
local T = ffiUtil.template
local _ = require("gettext")
local N_ = _.ngettext

local items_string = T(N_("1 item", "%1 items", num_items), num_items)
```
2019-08-24 23:06:06 +02:00
Frans de Jonge
a394e644b5 Add gettext_spec stub (#3343) 2017-10-11 14:22:11 +02:00