-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for PO files #14601
base: master
Are you sure you want to change the base?
Updates for PO files #14601
Conversation
Timestamps of PO files after commit:
|
src/po/Make_cyg.mak
Outdated
@@ -65,14 +65,18 @@ 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) \ | |||
$(XGETTEXT) --width=79 --package-name="Vim" --package-version="9.1" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with adding --package-name="Vim"
, but please leave out --package-version="9.1"
and msgid-bugs-address
. I think bugs should better be adressed by the relevant maintainers, and package-version will just be another version number that needs to be addressed on a new release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, about the version number I overlooked that, that's another place to remember to change when a new version comes out. I'll clean that up.
As for the "msgid-bugs-address" field, this is exactly what was done for developers. Here's what the documentation says:
‘--msgid-bugs-address=email@address’
Set the reporting address for msgid bugs. This is the email address or URL to which the translators shall report bugs in the untranslated strings:
That's why I made it auto-complete. I think that, probably, it is not necessary to clean it up.
src/po/Make_mvc.mak
Outdated
@@ -123,22 +123,24 @@ ja.sjis.po: ja.po | |||
@$(MAKE) -nologo -f Make_mvc.mak sjiscorr | |||
-$(RM) $@ | |||
!IF EXIST ("$(GETTEXT_PATH)\msgconv.exe") | |||
"$(GETTEXT_PATH)\msgconv.exe" -t CP932 $? | .\sjiscorr.exe > $@ | |||
"$(GETTEXT_PATH)\msgconv.exe" -w 79 -t CP932 $? | .\sjiscorr.exe > $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you are using -w 79
, further down you are using --width=
. Please use one consisten style. Also with regards to the quoation. you are now changing from \"
. I'd prefer if you don't change unrelated things, it makes reviewing harder. If you want to change quotation style, add an additional commit just for those stylistic changes please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you are using
-w 79
, further down you are using--width=
. Please use one consisten style.
For brevity, I wanted the line to fit into 80 columns. I'll fix it.
Also with regards to the quoation. you are now changing from
\"
. I'd prefer if you don't change unrelated things, it makes reviewing harder. If you want to change quotation style, add an additional commit just for those stylistic changes please.
Oh, I'm sorry! You've already talked about it once. Let me not redo it this time. I'm sorry, please, once again.
@@ -524,11 +556,13 @@ update-po: $(MOFILES:.mo=) | |||
|
|||
# Don't add a dependency here, we only want to update the .po files manually. | |||
$(LANGUAGES): | |||
@$(MAKE) -nologo -f Make_mvc.mak GETTEXT_PATH="$(GETTEXT_PATH)" $(PACKAGE).pot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you removing -nologo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, no, I didn't delete "-nologo". The "-l" switch is a synonym for "-nologo". It's just not used very often and not documented much anywhere. This way the string is shorter and fits into 80 columns.
iconv -f UTF-8 -t EUC-JP $< | \ | ||
$(SED) -e 's/charset=[uU][tT][fF]-8/charset=EUC-JP/' > $@; \ | ||
fi | ||
$(SED) -i.bkp -e \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sed -i is not portable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I once read that the "-i" switch is an extension implemented by GNU.
But now, as I checked, it is supported in both BSD and macOS. You just have to be sure to specify the extension of the backup file (you can specify an empty one).
https://man.freebsd.org/cgi/man.cgi?sed
https://www.baeldung.com/linux/gnu-bsd-stream-editor#2-the--i-option
https://stackoverflow.com/questions/5694228/sed-in-place-flag-that-works-both-on-mac-bsd-and-linux
I checked on FreeBSD and it works.
src/po/es.po
Outdated
@@ -10219,3 +10199,12 @@ msgstr "nombre de la biblioteca dinámica MzScheme" | |||
msgid "name of the MzScheme GC dynamic library" | |||
msgstr "nombre de la biblioteca dinámica MzScheme GC" | |||
|
|||
#, fuzzy, c-format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that and the following lines can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess so. It was formatted by gettext and it must have tagged those lines and I didn't check after it. I'll delete those lines and check the other files.
Hi, i tested your tree and I'm not sure why but some files are still being modified. At least for me: ~/p/vim ((2a4cf5d2b...) *$%) $ git status
HEAD detached at FETCH_HEAD
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: src/po/ja.euc-jp.po
modified: src/po/ja.sjis.po
modified: src/po/ru.cp1251.po
modified: src/po/sk.cp1250.po
modified: src/po/uk.cp1251.po |
@julio-b
What am I doing wrong?
|
@julio-b
|
@RestorerZ you need to compile vim after getting these commits. Just a checkout will not modify the po files, obviously. Anyway, I think trying to predict the wrap behavior is not going to solve the problem for everyone. After digging around in the mailing list i discovered this message https://lists.gnu.org/archive/html/bug-gettext/2023-07/msg00026.html which explains the situation. (This thread is about msgattrib, but the same thing applies for msgconv and the whole gettext suite). Also it appears that these files have been problematic since forever, forcing Bram to add workarounds like this: Lines 335 to 343 in ea99903
|
Yeah, just updated “gettext” in Ubuntu now and will try to compile.
@julio-b |
The following has been done to correct a possible unexpected processing of PO
files described in issue #14490 :
vim:tw=79:ts=8:ft=po:
was added to the PO files;--width=79
parameter has been set for gettext tools;$(PS) $(PSFLAGS) Set-ItemProperty -Path '$@' -Name LastWriteTime -Value (Get-Date -Format 'o')
command was added to Make_mvc.mak for guaranteed timestamp updates.
Other:
"Project-Id-Version" and "Report-Msgid-Bugs-To" fields of the file header are
automatically set.