Frans de Jonge
d64e143297
[i18n] GetText: ignore fuzzy strings ( #5807 )
...
Strings are prefilled by msgmerge with closely matching ones to reduce the amount of labor required by the translator. Often the string requires only minor adjustment, making the process faster, and when the string isn't a good match it's no big deal. However, these so-called fuzzy strings shouldn't be treated as if they were actually translated.
Fixes the effect seen in <https://github.com/koreader/koreader/issues/5806 >.
2020-02-03 12:11:07 +01:00
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