Commit Graph

8 Commits (master)

Author SHA1 Message Date
Benoit Pierre f661726fef tests: fix listing tests with `busted --list` 10 months ago
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>.
4 years ago
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>.
5 years ago
Frans de Jonge 621f36b4a9
[fix] GetText: guard against empty strings in translation (#5301)
Fixes <https://github.com/koreader/koreader/issues/5293>.
5 years ago
Frans de Jonge ece884a368
[fix, CI] Forgot to run luacheck (#5261)
My bad.
5 years ago
Frans de Jonge 3ab51b1f85
[spec] Test all gettext codepaths & support language with no plurals (#5260) 5 years ago
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)
```
5 years ago
Frans de Jonge a394e644b5 Add gettext_spec stub (#3343) 7 years ago