src/po/Makefile and src/po/Make_mvc.mak:
Created separate rules to handle plugins.
src/po/Make_all.mak:
The contents of the PO_VIM_JSLIST macro have been reverted to the initial state.
src/po/fixfilenames.vim and src/po/tojavascript.vim:
The fnamemodify function has been reverted to its original state.
src/po/README.txt and src/po/README_mvc.txt:
Added description on translating plugins.
doc/repeat.txt:
Changed description on preparing translations, added examples, added tags.
https://github.com/vim/vim/pull/15100
(10 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@cvwillegen , you have done a great job, thank you very much!
I made some changes to the makefiles, hopefully it will make it a bit easier to
prepare translations for plugins. Please see if there is anything you need to
change. I tested the changes on Windows NT 6.1 and Ubuntu 22. There were no
errors, the files were created as expected.
Well, there are some more questions when preparing PO-files.
Could you please tell me how plurals will be handled? Is there such
functionality?
Is there a possibility to add comments for translators from source scripts to
PO-files?
Otherwise, as far as I have tested, everything works great.
Oh, and if you have time, please look at the following:
When processing the "netrw.vim" file, xgettex
swears that it can't recognize
some lines.
@chrisbra , @cvwillegen , please look at the changes I made in the documentation.
When I wrote it in Russian, it was clear to me in principle.
But when translating into English, there may have been errors.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@cvwillegen commented on this pull request.
> +The author of the plugin or whoever would like to translate messages in the +plugin must specify a call to the |bindtextdomain()| function somewhere at the +beginning of the script, specifying the name of the package and the route to +the directory where the file with the translated messages is located: +> + :call bindtextdomain("foobar", fnamemodify(expand("<script>"), ':p:h') .. '/../lang/') +< +Where: +"foobar" is the unique package identifier by which the |gettext()| function will +later search for translation strings for this plugin. +"lang/" is the relative or absolute path to the directory structure where the +translation file is located. +The directory structure where the message translation file is placed should be +as follows: "lang/<lang_id>/LC_MESSAGES". To specify <lang_id>, i.e. the +target language, see |multilang|. +This function call is specified only once for the entire plug-in.
specified -> needed
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@cvwillegen commented on this pull request.
> @@ -160,3 +160,20 @@ convert ja.po to EUC-JP (supposed as your system encoding): "Content-Type: text/plain; charset=EUC-JP\n" There are examples in the Makefile for the conversions already supported.. + + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the
specify a once call -> specify a one-time call
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
> + + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the +bindtextdomain() function in scripts containing translation strings, and for +all message strings, the gettext() function. For more information,
the gettext() function -> to add a {package} argument to the gettext() function
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@cvwillegen commented on this pull request.
> @@ -137,4 +137,22 @@ command: nmake.exe -f Make_mvc.mak clean + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the
specify a once call -> specify a one-time call
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
> @@ -137,4 +137,22 @@ command: nmake.exe -f Make_mvc.mak clean + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the +bindtextdomain() function in scripts containing translation strings, and for +all message strings, the gettext() function. For more information,
the gettext() function -> to add a {package} argument to the gettext() function
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ commented on this pull request.
> +The author of the plugin or whoever would like to translate messages in the +plugin must specify a call to the |bindtextdomain()| function somewhere at the +beginning of the script, specifying the name of the package and the route to +the directory where the file with the translated messages is located: +> + :call bindtextdomain("foobar", fnamemodify(expand("<script>"), ':p:h') .. '/../lang/') +< +Where: +"foobar" is the unique package identifier by which the |gettext()| function will +later search for translation strings for this plugin. +"lang/" is the relative or absolute path to the directory structure where the +translation file is located. +The directory structure where the message translation file is placed should be +as follows: "lang/<lang_id>/LC_MESSAGES". To specify <lang_id>, i.e. the +target language, see |multilang|. +This function call is specified only once for the entire plug-in.
Thank you, I have corrected it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@RestorerZ commented on this pull request.
> @@ -160,3 +160,20 @@ convert ja.po to EUC-JP (supposed as your system encoding): "Content-Type: text/plain; charset=EUC-JP\n" There are examples in the Makefile for the conversions already supported.. + + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the
Thank you, I have corrected it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
> + + +TRANSLATION OF VIM THE EDITOR PLUG-INS + +Vim supports displaying plugin messages for various native languages. +Translation is available both for plugins that are supplied as part of the Vim +editor (e.g. "optwin.vim") and for third-party plugin packages.. + +To translate the plugins supplied with the Vim editor, you must specify a +gettext() function call for the strings you want to translate. +The translation of these strings will be retrieved by gettext() from the MO +file "vim.mo". + +For third-party plugins, it is necessary to specify a once call to the +bindtextdomain() function in scripts containing translation strings, and for +all message strings, the gettext() function. For more information,
Thank you, I have corrected it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
I made some changes to the makefiles, hopefully it
will make it a bit easier to prepare translations for plugins.
Yes and no...
The changes to PO_VIM_JSLIST
, src/po/fixfilenames.vim
and src/po/tojavascript.vim
that I made are neccessary to make it possible for a plugin to have multiple .vim files with the same base name. The directory seperators are changed to __ to account for this. If you look at the original (Bram's) help, it said:
Your directory layout would be like this:
¦start/foobar/plugin/foo.vim " always loaded, defines commands
¦start/foobar/plugin/bar.vim " always loaded, defines commands
¦start/foobar/autoload/foo.vim " loaded when foo command used
(note that there are 2 files called foo.vim)
This means, that both files called foo.vim
are to be specified for the POT file creation. Because the temporary files are written one by one, the contents of the second file overwrite the first.
I've tested this:
~/.vim/bundle/Vundle.vim$ grep gettext */vundlelog.vim
ftplugin/vundlelog.vim:echo gettext("This is ftplugin/", "vundle")
syntax/vundlelog.vim:echo gettext("This is syntax/", "vundle")
(Run the Make command as indicated)
$ make -f Makefile "PLUGPACKAGE=vundle" "PO_PLUG_INPUTLIST=~/.vim/bundle/Vundle.vim/autoload/vundle.vim ~/.vim/bundle/Vundle.vim/autoload/vundle/config.vim ~/.vim/bundle/Vundle.vim/ftplugin/vundlelog.vim ~/.vim/bundle/Vundle.vim/syntax/vundlelog.vim" POT_PLUGPACKAGE_PATH=. VIMPROG=../vim vundle.pot
Result:
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <L...@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: vundlelog.js:38
msgid "This is syntax/"
msgstr ""
As you can see, only one call to gettext()
has been included.
Could you please tell me how plurals will be handled? Is there such functionality?
I think we need ngettext()
and dngettext()
for that. These are not (yet) implemented, but should not be hard to do. I'll look into that after we've done this part of the job
:-)
Is there a possibility to add comments for translators from source scripts to PO-files?
I have no answer for this...
Oh, and if you have time, please look at the following: When processing the "netrw.vim"
file,xgettex
swears that it can't recognize some lines.
I'll see what I can do, but I don't know if I'll succeed...
Please look into multiple .vim files having the same base name. I tried changing back the changes in the tojavascript.vim and fixfilenames.vim files, but that didn't work. I has to do with the $(?F:.vim=.js) in there, but I haven't been able to make it work yet...
Christ van Willegen
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
This means, that both files called foo.vim are to be specified for the POT file creation. Because the temporary files are written one by one, the contents of the second file overwrite the first.
Oh, yes! I didn't take that into account. Thank you for paying attention to this.
Please look into multiple .vim files having the same base name. I tried changing back the changes in the tojavascript.vim and fixfilenames.vim files, but that didn't work. I has to do with the $(?F:.vim=.js) in there, but I haven't been able to make it work yet...
Yes, I will definitely try to fix it. But a little later.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@cvwillegen
Пока самый простой способ, который приходит на ум, чтобы это решить. Это создвать временные файлы ".js", там же где и исходные файлы ".vim".
То есть вместо $(?F:.vim=.js) использовать $(?:.vim=.js). Но в UNIX-подобных могут быть ограничения на запись в каталоги, наверное. Надо смотреть.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@cvwillegen
Kindly test out this alternative.
I quickly made a rough drawing of it.
I have only tested it on WinNT 6.1 up to now.
It appears to be functioning properly.
nmake.exe -f Make_mvc.mak "VIMPROG=D:\Programs\Vim\vim91\vim.exe" "PLUGPACKAGE=make" "PO_PLUG_INPUTLIST=..\..\runtime\syntax\make.vim ..\..\runtime\ftplugin\make.vim ..\..\runtime\indent\make.vim" make.pot
msgid ""
msgstr ""
"Project-Id-Version: make\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-26 20:45+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <L...@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: make0.js:16
msgid "This is make.vim in syntax"
msgstr ""
#: make1.js:15
msgid "This is make.vim in ftplugin"
msgstr ""
#: make2.js:18
msgid "This is make.vim in indent"
msgstr ""
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Everything seems to be working correctly now. The path is recognized in the Vim script when adjusted. A template PO for the Vim editor is also normally created. I checked it in Windows and Ubuntu.
nmake.exe -f Make_mvc.mak "VIMPROG=D:\Programs\Vim\vim91\vim.exe" "PLUGPACKAGE=make" "PO_PLUG_INPUTLIST=d:\programs\vim\vim91\syntax\make.vim d:\programs\vim\vim91\ftplugin\make.vim d:\programs\vim\vim91\indent\make.vim" make.pot
Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: d:/Programs/Vim/vim91/syntax/make.vim:16
msgid "This is make.vim in syntax"
msgstr ""
#: d:/Programs/Vim/vim91/ftplugin/make.vim:13
msgid "This is make.vim in ftplugin"
msgstr ""
#: d:/Programs/Vim/vim91/indent/make.vim:18
msgid "This is make.vim in indent"
msgstr ""
make -f Makefile "VIMPROG=vim" "PLUGPACKAGE=make" "PO_PLUG_INPUTLIST=../../runtime/ftplugin/make.vim ../../runtime/indent/make.vim ../../runtime/syntax/make.vim" make.pot
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../runtime/ftplugin/make.vim:13
msgid "This is make.vim in ftplugin"
msgstr ""
#: ../../runtime/indent/make.vim:12
msgid "This is make.vim in indent"
msgstr ""
#: ../../runtime/syntax/make.vim:13
msgid "This is make.vim in syntax"
msgstr ""
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
It's weird, when I run your make.pot
example (I added a few gettext()
calls in the right place), my make.pot
file looks correct, but my vundle.pot end with these lines:
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: vundlelog2.js:17
msgid "This is ftplugin/"
msgstr ""
#: vundlelog3.js:38
msgid "This is syntax/"
msgstr ""
I found the problem, and it may have been in there for a long time...
You added gettext()
calls to all files called make.vim
in your runtime/*/ files, and added them all to the invocation of the Makefile.
Let me change your example to this:
~/src/vim_restorer/src/po$ make -f Makefile "VIMPROG=vim" "PLUGPACKAGE=make" "PO_PLUG_INPUTLIST=~/src/vim_restorer/runtime/ftplugin/make.vim ../../runtime/syntax/xcompose.vim ../../runtime/indent/make.vim ../../runtime/syntax/make.vim" make.pot
(I added a non-sensical xcompose.vim
to the input file list. I could imagine you would 'just' put a find -R in there to get all files in your plugin, or you'd have to remember which files has gettext() calls and which ones didn't...)
In that case, the make.pot looks like:
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: /home/christ/src/vim_restorer/runtime/ftplugin/make.vim:13
msgid "This is make.vim in ftplugin"
msgstr ""
#: make2.js:18
msgid "This is make.vim in indent"
msgstr ""
#: make3.js:16
msgid "This is make.vim in syntax"
msgstr ""
This means that the search/replace will fail after not finding a file. As I said before, this has probably been in there for a long time...
This patch fixes it:
diff --git a/src/po/fixfilenames.vim b/src/po/fixfilenames.vim
index c698c4885..0a8780ea4 100644
--- a/src/po/fixfilenames.vim
+++ b/src/po/fixfilenames.vim
@@ -6,7 +6,7 @@ set shortmess+=A
let s:namenum = 0
for s:name in argv()[1:]
let s:jsname = fnamemodify(s:name, ":t:r") .. s:namenum .. ".js"
- exe "%s+" .. s:jsname .. "+" .. substitute(s:name, '\\', '/', 'g') .. "+"
+ exe "%s+" .. s:jsname .. "+" .. substitute(s:name, '\\', '/', 'g') .. "+e"
let s:namenum +=1
endfor
Whew, glad we're testing this!
Christ van Willegen
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Yes, everything is functioning properly. Thank you!
nmake.exe -f Make_mvc.mak "VIMPROG=vim.exe" "PLUGPACKAGE=make" "PO_PLUG_INPUTLIST=..\..\runtime\ftplugin\make.vim ..\..\runtime\syntax\xcompose.vim ..\..\runtime\indent\make.vim ..\..\runtime\syntax\make.vim" make.pot
"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n"
#: ../../runtime/ftplugin/make.vim:12
msgid "This is make.vim in ftplugin" msgstr ""
#: ../../runtime/indent/make.vim:11
msgid "This is make.vim in indent" msgstr ""
#: ../../runtime/syntax/make.vim:15
msgid "This is make.vim in syntax" msgstr ""
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Processing of several file names. For example:
#: ../../runtime/autoload/netrw.vim:4852 ../../runtime/autoload/netrw.vim:9986 msgid "\" Quick Help: <F1>:help " msgstr ""
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Ok, I've checked it out some more, and it looks ok so far..
I would suggest adding a test for the Makefile, like this:
$ git status -v
On branch gettext-for-plugin
Your branch is up to date with 'origin/gettext-for-plugin'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: src/testdir/Make_all.mak
new file: src/testdir/test_gettext_make.vim
new file: src/testdir/test_gettext_makefile_in1.vim
new file: src/testdir/test_gettext_makefile_in2.vim
new file: src/testdir/test_gettext_makefile_in3.vim
new file: src/testdir/test_gettext_makefile_in4.vim
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index a49f15875..1f22cdf04 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -164,6 +164,7 @@ NEW_TESTS = \
test_gettext \
test_gettext_cp1251 \
test_gettext_utf8 \
+ test_gettext_make \
test_getvar \
test_gf \
test_glob2regpat \
diff --git a/src/testdir/test_gettext_make.vim b/src/testdir/test_gettext_make.vim
new file mode 100644
index 000000000..8f3466a71
--- /dev/null
+++ b/src/testdir/test_gettext_make.vim
@@ -0,0 +1,49 @@
+source check.vim
+CheckNotMSWindows
+
+" Test for package translation Makefile
+func Test_gettext_makefile_notwindows()
+ cd ../po
+ let make=system("make -f Makefile PLUGPACKAGE=test_gettext PO_PLUG_INPUTLIST=\"../testdir/test_gettext_makefile_in1.vim ../testdir/test_gettext_makefile_in2.vim ../testdir/test_gettext_makefile_in3.vim ../testdir/test_gettext_makefile_in4.vim\" test_gettext.pot")
+ let expected = [
+ \ '# SOME DESCRIPTIVE TITLE.',
+ \ '# Copyright (C) YEAR THE PACKAGE''S COPYRIGHT HOLDER',
+ \ '# This file is distributed under the same license as the test_gettext package.',
+ \ '# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.',
+ \ '#',
+ \ '#, fuzzy',
+ \ 'msgid ""',
+ \ 'msgstr ""',
+ \ '"Project-Id-Version: test_gettext\n"',
+ \ '"Report-Msgid-Bugs-To: \n"',
+ \ '"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"',
+ \ '"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"',
+ \ '"Language-Team: LANGUAGE <L...@li.org>\n"',
+ \ '"Language: \n"',
+ \ '"MIME-Version: 1.0\n"',
+ \ '"Content-Type: text/plain; charset=CHARSET\n"',
+ \ '"Content-Transfer-Encoding: 8bit\n"',
+ \ '',
+ \ '#: ../testdir/test_gettext_makefile_in1.vim:4 ../testdir/test_gettext_makefile_in1.vim:6',
+ \ '#: ../testdir/test_gettext_makefile_in2.vim:5 ../testdir/test_gettext_makefile_in4.vim:4',
+ \ 'msgid "This is a test"',
+ \ 'msgstr ""',
+ \ '',
+ \ '#: ../testdir/test_gettext_makefile_in1.vim:5',
+ \ 'msgid "This is another test"',
+ \ 'msgstr ""',
+ \ '',
+ \ '#: ../testdir/test_gettext_makefile_in2.vim:4',
+ \ 'msgid "This is a test from the second file"',
+ \ 'msgstr ""',
+ \ '',
+ \ '#: ../testdir/test_gettext_makefile_in4.vim:5',
+ \ 'msgid "This is a fourth test"',
+ \ 'msgstr ""']
+ let potfile = filter(readfile("test_gettext.pot"), 'v:val !~ "POT-Creation-Date"')
+ call assert_equal(expected, potfile)
+ call delete('test_gettext.pot')
+ cd -
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_gettext_makefile_in1.vim b/src/testdir/test_gettext_makefile_in1.vim
new file mode 100644
index 000000000..cbe11591f
--- /dev/null
+++ b/src/testdir/test_gettext_makefile_in1.vim
@@ -0,0 +1,7 @@
+" Test file for gettext() package makefile
+" Last Change: 2024 Jun 01
+
+echo gettext("This is a test", "test_gettext")
+echo gettext("This is another test", "test_gettext")
+echo gettext("This is a test", "test_gettext")
+" vim: ts=8
diff --git a/src/testdir/test_gettext_makefile_in2.vim b/src/testdir/test_gettext_makefile_in2.vim
new file mode 100644
index 000000000..86d3dd9ed
--- /dev/null
+++ b/src/testdir/test_gettext_makefile_in2.vim
@@ -0,0 +1,6 @@
+" Test file for gettext() package makefile
+" Last Change: 2024 Jun 01
+
+echo gettext("This is a test from the second file", "test_gettext")
+echo gettext("This is a test", "test_gettext")
+" vim: ts=8
diff --git a/src/testdir/test_gettext_makefile_in3.vim b/src/testdir/test_gettext_makefile_in3.vim
new file mode 100644
index 000000000..f4cf93d1a
--- /dev/null
+++ b/src/testdir/test_gettext_makefile_in3.vim
@@ -0,0 +1,4 @@
+" Test file for gettext() package makefile
+" Last Change: 2024 Jun 01
+
+" vim: ts=8
diff --git a/src/testdir/test_gettext_makefile_in4.vim b/src/testdir/test_gettext_makefile_in4.vim
new file mode 100644
index 000000000..7f9f3f7dd
--- /dev/null
+++ b/src/testdir/test_gettext_makefile_in4.vim
@@ -0,0 +1,6 @@
+" Test file for gettext() package makefile
+" Last Change: 2024 Jun 01
+
+echo gettext("This is a test", "test_gettext")
+echo gettext("This is a fourth test", "test_gettext")
+" vim: ts=8
This adds a test target that runs the Makefile. It includes a few (mostly empty...) .vim files that have calls to gettext()
in them to test that the .POT file is created successfully.
I don't have a Windows machine, so perhaps you can add a test function for testing this on Windows??
Thank you for looking into how to make it easier to create a .POT file for a plugin! That was my greatest nightmare (and we all have our strengths and parts where others can help...)
Christ van Willegen
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@cvwillegen
Yes, I agree, tests are useful and should be done. I'll look into it all, but please give me some time.
I'll try to add a test for MS Windows (to be honest, I haven't worked with test files for Vim yet).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@RestorerZ pushed 1 commit.
You are receiving this because you are subscribed to this thread.