mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 05:48:17 +00:00
Fix localization: Fix build: Fix sed issue on OSX.
Problem: On OSX, sed commands processing files converted to encodings other that UTF-8 fail with "RE error: illegal byte sequence". Solution: Make sed execute with C locale throgh environment variables (LANG=C, LC_ALL=C, LC_CTYPE=C).
This commit is contained in:

committed by
Justin M. Keyes

parent
a0b78b5733
commit
0e9d2464b4
@@ -138,6 +138,7 @@ VIM = ../../../build/bin/nvim
|
||||
MSGFMT = OLD_PO_FILE_INPUT=yes msgfmt -v
|
||||
XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext
|
||||
MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge
|
||||
SAFE_SED = LANG=C LC_CTYPE=C LC_ALL=C sed
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .po .mo .pot .ck
|
||||
@@ -205,44 +206,44 @@ sjiscorr: sjiscorr.c
|
||||
|
||||
ja.euc-jp.po: ja.po
|
||||
iconv -f utf-8 -t euc-jp ja.po | \
|
||||
sed -e 's/charset=utf-8/charset=euc-jp/' -e 's/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po
|
||||
$(SAFE_SED) -e 's/charset=utf-8/charset=euc-jp/' -e 's/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po
|
||||
|
||||
# Convert cs.po to create cs.cp1250.po.
|
||||
cs.cp1250.po: cs.po
|
||||
rm -f cs.cp1250.po
|
||||
iconv -f iso-8859-2 -t cp1250 cs.po | \
|
||||
sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po
|
||||
$(SAFE_SED) -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from cs.po, DO NOT EDIT/' > cs.cp1250.po
|
||||
|
||||
# Convert pl.po to create pl.cp1250.po.
|
||||
pl.cp1250.po: pl.po
|
||||
rm -f pl.cp1250.po
|
||||
iconv -f iso-8859-2 -t cp1250 pl.po | \
|
||||
sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po
|
||||
$(SAFE_SED) -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.cp1250.po
|
||||
|
||||
# Convert pl.po to create pl.UTF-8.po.
|
||||
pl.UTF-8.po: pl.po
|
||||
rm -f pl.UTF-8.po
|
||||
iconv -f iso-8859-2 -t utf-8 pl.po | \
|
||||
sed -e 's/charset=ISO-8859-2/charset=utf-8/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po
|
||||
$(SAFE_SED) -e 's/charset=ISO-8859-2/charset=utf-8/' -e 's/# Original translations/# Generated from pl.po, DO NOT EDIT/' > pl.UTF-8.po
|
||||
|
||||
# Convert sk.po to create sk.cp1250.po.
|
||||
sk.cp1250.po: sk.po
|
||||
rm -f sk.cp1250.po
|
||||
iconv -f iso-8859-2 -t cp1250 sk.po | \
|
||||
sed -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po
|
||||
$(SAFE_SED) -e 's/charset=ISO-8859-2/charset=cp1250/' -e 's/# Original translations/# Generated from sk.po, DO NOT EDIT/' > sk.cp1250.po
|
||||
|
||||
# Convert zh_CN.po to create zh_CN.cp936.po.
|
||||
# set 'charset' to gbk to avoid that msfmt generates a warning
|
||||
zh_CN.cp936.po: zh_CN.po
|
||||
rm -f zh_CN.cp936.po
|
||||
iconv -f gb2312 -t cp936 zh_CN.po | \
|
||||
sed -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po
|
||||
$(SAFE_SED) -e 's/charset=gb2312/charset=gbk/' -e 's/# Original translations/# Generated from zh_CN.po, DO NOT EDIT/' > zh_CN.cp936.po
|
||||
|
||||
# Convert ko.UTF-8.po to create ko.po.
|
||||
ko.po: ko.UTF-8.po
|
||||
rm -f ko.po
|
||||
iconv -f UTF-8 -t euc-kr ko.UTF-8.po | \
|
||||
sed -e 's/charset=UTF-8/charset=euc-kr/' \
|
||||
$(SAFE_SED) -e 's/charset=UTF-8/charset=euc-kr/' \
|
||||
-e 's/# Korean translation for Vim/# Generated from ko.UTF-8.po, DO NOT EDIT/' \
|
||||
> ko.po
|
||||
|
||||
@@ -250,13 +251,13 @@ ko.po: ko.UTF-8.po
|
||||
ru.cp1251.po: ru.po
|
||||
rm -f ru.cp1251.po
|
||||
iconv -f utf-8 -t cp1251 ru.po | \
|
||||
sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
|
||||
$(SAFE_SED) -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from ru.po, DO NOT EDIT/' > ru.cp1251.po
|
||||
|
||||
# Convert uk.po to create uk.cp1251.po.
|
||||
uk.cp1251.po: uk.po
|
||||
rm -f uk.cp1251.po
|
||||
iconv -f utf-8 -t cp1251 uk.po | \
|
||||
sed -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po
|
||||
$(SAFE_SED) -e 's/charset=utf-8/charset=cp1251/' -e 's/# Original translations/# Generated from uk.po, DO NOT EDIT/' > uk.cp1251.po
|
||||
|
||||
prefixcheck:
|
||||
@if test "x" = "x$(prefix)"; then \
|
||||
|
Reference in New Issue
Block a user