diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-27 13:40:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-27 13:40:11 +0100 |
commit | a1d5f9f33c68d06475406d6f44d307d5e01adc01 (patch) | |
tree | d717b6a8973ea87313b596ad682308e48574a34d /src/po | |
parent | 9f3afe7a70d50447424b8d7404aae0d641cd827c (diff) |
patch 9.0.1581: translation does not work for plural argumentv9.0.1581
Problem: Translation does not work for plural argument.
Solution: Use PLURAL_MSG() for errors and with xgettext. (closes #12443)
Diffstat (limited to 'src/po')
-rw-r--r-- | src/po/Make_all.mak | 2 | ||||
-rw-r--r-- | src/po/Make_cyg.mak | 4 | ||||
-rw-r--r-- | src/po/Make_ming.mak | 4 | ||||
-rw-r--r-- | src/po/Make_mvc.mak | 4 | ||||
-rw-r--r-- | src/po/Makefile | 3 |
5 files changed, 9 insertions, 8 deletions
diff --git a/src/po/Make_all.mak b/src/po/Make_all.mak index 7a6144e64c..f5f8e131b6 100644 --- a/src/po/Make_all.mak +++ b/src/po/Make_all.mak @@ -188,3 +188,5 @@ PO_VIM_JSLIST = \ optwin.js \ defaults.js +# Arguments for xgettext to pick up messages to translate from the source code. +XGETTEXT_KEYWORDS = --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --keyword=PLURAL_MSG:2,4 diff --git a/src/po/Make_cyg.mak b/src/po/Make_cyg.mak index 2969d1e872..705858da58 100644 --- a/src/po/Make_cyg.mak +++ b/src/po/Make_cyg.mak @@ -66,14 +66,14 @@ PO_INPUTLIST = \ first_time: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) $(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) $(XGETTEXT) --default-domain=$(LANGUAGE) \ - --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST) + --add-comments $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) $(XGETTEXT) --default-domain=$(PACKAGE) \ - --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST) + --add-comments $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) $(MV) $(PACKAGE).po $(PACKAGE).pot $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js diff --git a/src/po/Make_ming.mak b/src/po/Make_ming.mak index 1912bc51ad..42dab84449 100644 --- a/src/po/Make_ming.mak +++ b/src/po/Make_ming.mak @@ -79,14 +79,14 @@ PO_INPUTLIST = \ first_time: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) $(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) $(XGETTEXT) --default-domain=$(LANGUAGE) \ - --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST) + --add-comments $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) $(XGETTEXT) --default-domain=$(PACKAGE) \ - --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 $(PO_INPUTLIST) $(PO_VIM_JSLIST) + --add-comments $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) $(MV) $(PACKAGE).po $(PACKAGE).pot $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js diff --git a/src/po/Make_mvc.mak b/src/po/Make_mvc.mak index bdb6dcce49..9cfa408f28 100644 --- a/src/po/Make_mvc.mak +++ b/src/po/Make_mvc.mak @@ -60,7 +60,7 @@ first_time: files $(VIM) -u NONE --not-a-term -S tojavascript.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) set OLD_PO_FILE_INPUT=yes set OLD_PO_FILE_OUTPUT=yes - $(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files $(PO_VIM_JSLIST) + $(XGETTEXT) --default-domain=$(LANGUAGE) --add-comments $(XGETTEXT_KEYWORDS) --files-from=.\files $(PO_VIM_JSLIST) $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(LANGUAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js @@ -68,7 +68,7 @@ $(PACKAGE).pot: files $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) set OLD_PO_FILE_INPUT=yes set OLD_PO_FILE_OUTPUT=yes - $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 --files-from=.\files $(PO_VIM_JSLIST) + $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments $(XGETTEXT_KEYWORDS) --files-from=.\files $(PO_VIM_JSLIST) $(MV) $(PACKAGE).po $(PACKAGE).pot $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) $(RM) *.js diff --git a/src/po/Makefile b/src/po/Makefile index 2b17fead38..b637f12138 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -208,8 +208,7 @@ $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST) $(VIM) -u NONE --not-a-term -S tojavascript.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) # create vim.pot $(XGETTEXT) --default-domain=$(PACKAGE) --add-comments \ - --keyword=_ --keyword=N_ --keyword=NGETTEXT:1,2 \ - $(PO_INPUTLIST) $(PO_VIM_JSLIST) + $(XGETTEXT_KEYWORDS) $(PO_INPUTLIST) $(PO_VIM_JSLIST) mv -f $(PACKAGE).po $(PACKAGE).pot # Fix Vim scripts names, so that "gf" works $(VIM) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot $(PO_VIM_INPUTLIST) |