[vim/vim] Fix for the pot_plugpackage_path variable (PR #15282)

10 views
Skip to first unread message

Restorer

unread,
Jul 17, 2024, 6:35:27 AM7/17/24
to vim/vim, Subscribed

Fix for the pot_plugpackage_path variable
Fix #15275


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/15282

Commit Summary

  • e16bae6 Fix for the pot_plugpackage_path variable

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282@github.com>

K.Takata

unread,
Jul 17, 2024, 6:41:21 AM7/17/24
to vim/vim, Subscribed

@k-takata commented on this pull request.


In src/po/Makefile:

> @@ -313,8 +313,9 @@ $(LANGUAGES):
 # For translations of plug-ins
 #######
 
+POT_PLUGPACKAGE_PATH = ${PWD}

Any reason to use ${} instead of $()? (Both are the same, though.)


In src/po/Makefile:

> @@ -327,7 +328,6 @@ $(PLUGPACKAGE).pot: $(PO_PLUG_INPUTLIST)
 	rm -f *.js ./vim_to_js
 
 # Converting the PO file of the plug-in package to the binary format of the MO
-MO_PLUGPACKAGE_PATH != pwd
 $(PLUGPACKAGE).mo: $(PO_PLUGPACKAGE)
 	$(MSGFMTCMD) -o $(MO_PLUGPACKAGE_PATH)/$@ $<

Should be POT_PLUGPACKAGE_PATH instead of MO_PLUGPACKAGE_PATH?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/review/2182542748@github.com>

Christian Brabandt

unread,
Jul 17, 2024, 7:53:31 AM7/17/24
to vim/vim, Subscribed

Wondering if this would be simpler to get rid of the ...PLUGPACKAGE_PATH variable completly (I assume xgettext and msgfmt will use the current directory by default anyhow?):

diff --git a/src/po/Makefile b/src/po/Makefile
index 0f7f85dd1..caec2fe62 100644
--- a/src/po/Makefile
+++ b/src/po/Makefile
@@ -314,21 +314,18 @@ $(LANGUAGES):
 #######

 # Preparing the POT file of the plug-in package
-POT_PLUGPACKAGE_PATH != pwd
 $(PLUGPACKAGE).pot: $(PO_PLUG_INPUTLIST)
        $(VIMPROG) -u NONE --not-a-term -S tojavascript.vim \
                $(PLUGPACKAGE).pot $?
        $(XGETTEXT) --from-code=UTF-8 --default-domain=$(PLUGPACKAGE) \
                --package-name=$(PLUGPACKAGE) \
-               --output-dir=$(POT_PLUGPACKAGE_PATH) \
                --output=$(PLUGPACKAGE).pot --files-from=./vim_to_js
        $(VIMPROG) -u NONE --not-a-term -S fixfilenames.vim \
-               $(POT_PLUGPACKAGE_PATH)/$(PLUGPACKAGE).pot $?
+               $(PLUGPACKAGE).pot $?
        rm -f *.js ./vim_to_js

 # Converting the PO file of the plug-in package to the binary format of the MO
-MO_PLUGPACKAGE_PATH != pwd
 $(PLUGPACKAGE).mo: $(PO_PLUGPACKAGE)
-       $(MSGFMTCMD) -o $(MO_PLUGPACKAGE_PATH)/$@ $<
+       $(MSGFMTCMD) -o $@ $<

 # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/c2233130977@github.com>

Restorer

unread,
Jul 17, 2024, 7:55:12 AM7/17/24
to vim/vim, Subscribed

@RestorerZ commented on this pull request.


In src/po/Makefile:

> @@ -313,8 +313,9 @@ $(LANGUAGES):
 # For translations of plug-ins
 #######
 
+POT_PLUGPACKAGE_PATH = ${PWD}

As I understand it, the *BSD world prefers curly braces. And the GNU world also, in principle, uses them for variables.
But in this makefile, parentheses are used everywhere, so I fixed it. A uniform style must be observed.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/review/2182704548@github.com>

Restorer

unread,
Jul 17, 2024, 7:55:38 AM7/17/24
to vim/vim, Subscribed

@RestorerZ commented on this pull request.


In src/po/Makefile:

> @@ -327,7 +328,6 @@ $(PLUGPACKAGE).pot: $(PO_PLUG_INPUTLIST)
 	rm -f *.js ./vim_to_js
 
 # Converting the PO file of the plug-in package to the binary format of the MO
-MO_PLUGPACKAGE_PATH != pwd
 $(PLUGPACKAGE).mo: $(PO_PLUGPACKAGE)
 	$(MSGFMTCMD) -o $(MO_PLUGPACKAGE_PATH)/$@ $<

Yes, I hurried, inattentive.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/review/2182706866@github.com>

Restorer

unread,
Jul 17, 2024, 8:00:11 AM7/17/24
to vim/vim, Subscribed

Wondering if this would be simpler to get rid of the ...PLUGPACKAGE_PATH variable completly (I assume xgettext and msgfmt will use the current directory by default anyhow?):

Probably, yes. I haven't tested it, but I think you're right.
I'll do it now.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/c2233146105@github.com>

Restorer

unread,
Jul 17, 2024, 8:10:53 AM7/17/24
to vim/vim, Subscribed

Although not. We have declared the variable "MO_PLUGPACKAGE_PATH" and "POT_PLUGPACKAGE_PATH" in the documentation. This is done in case you need to place the result not in the "src/po" directory (which is for translations of the Vim editor itself), but where it is needed by the one who translates the scripts.
If you don't mind, I'll just fix what Takata‐san pointed out and send the push here.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/c2233168651@github.com>

Christian Brabandt

unread,
Jul 17, 2024, 8:18:06 AM7/17/24
to vim/vim, Subscribed

sure


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/c2233182465@github.com>

Restorer

unread,
Jul 17, 2024, 8:22:54 AM7/17/24
to vim/vim, Push

@RestorerZ pushed 1 commit.

  • cc257f2 Fix for the pot_plugpackage_path variable


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/before/e16bae61e41d5ddc6f40f796f6ae4cd5ebf3f84d/after/cc257f26e71c44eb3e2dca00c7d377b9cdbe14f6@github.com>

Christian Brabandt

unread,
Jul 17, 2024, 1:31:51 PM7/17/24
to vim/vim, Subscribed

Closed #15282 via 30d54fd.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/issue_event/13540204116@github.com>

Christian Brabandt

unread,
Jul 17, 2024, 1:31:53 PM7/17/24
to vim/vim, Subscribed

thanks!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/15282/c2233835807@github.com>

Reply all
Reply to author
Forward
0 new messages