mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-17 05:51:57 -05:00
gitk: commit translation files without file information
File information in the translation files is only helpful for the translators, but is not needed to compile the message catalogs. On top of that, file information is rather volatile and leads to large patches that do not carry essential information. For this reason, Git project has opted to remove the file information from its translation files. Let's do that in this project, too. Rewrite the update-po target to generate *.po files that do contain file information for the benefit of translators. Configure a clean filter under the name "gettext-no-location", which is the same that the Git project uses. It is expected that translators have already configured their repository suitably. Nevertheless, write a reminder as part of the update-po target. Apply the clean-filter to the translation files. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
This commit is contained in:
5
Makefile
5
Makefile
@@ -70,7 +70,10 @@ gitk-wish: gitk GIT-TCLTK-VARS
|
||||
$(PO_TEMPLATE): gitk
|
||||
$(XGETTEXT) -kmc -LTcl -o $@ gitk
|
||||
update-po:: $(PO_TEMPLATE)
|
||||
$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
|
||||
$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U --add-location $p $(PO_TEMPLATE) ; )
|
||||
@echo "Before committing changes, ensure that a clean-filter is installed:"; \
|
||||
echo; \
|
||||
echo " git config filter.gettext-no-location.clean \"msgcat --no-location -\""
|
||||
$(ALL_MSGFILES): %.msg : %.po
|
||||
@echo Generating catalog $@
|
||||
$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $<
|
||||
|
||||
1
po/.gitattributes
vendored
Normal file
1
po/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*.po filter=gettext-no-location
|
||||
310
po/pt_br.po
310
po/pt_br.po
File diff suppressed because it is too large
Load Diff
314
po/pt_pt.po
314
po/pt_pt.po
File diff suppressed because it is too large
Load Diff
372
po/zh_cn.po
372
po/zh_cn.po
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user