mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
l10n: Remove some non-UTF8 .po files. (#5622)
Some .po files do not have UTF8 versions, leave those alone for now. Also remove sjiscorr.c utility.
This commit is contained in:
parent
927e3e32d7
commit
c3a7a94a12
@ -129,8 +129,7 @@ preprocess_patch() {
|
|||||||
local nvim="nvim -u NORC -i NONE --headless"
|
local nvim="nvim -u NORC -i NONE --headless"
|
||||||
|
|
||||||
# Remove *.proto, Make*, gui_*, some if_*
|
# Remove *.proto, Make*, gui_*, some if_*
|
||||||
local na_src='proto\|Make*\|gui_*'
|
local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
|
||||||
na_src="$na_src"'\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
|
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Remove channel.txt, netbeans.txt, os_*.txt, todo.txt, version*.txt, tags
|
# Remove channel.txt, netbeans.txt, os_*.txt, todo.txt, version*.txt, tags
|
||||||
@ -141,6 +140,10 @@ preprocess_patch() {
|
|||||||
local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms'
|
local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms'
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\%('${na_src_testdir}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\%('${na_src_testdir}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
|
# Remove some *.po files. #5622
|
||||||
|
local na_po='sjiscorr.c\|ja.sjis.po\|ko.po\|pl.cp1250.po\|pl.po\|ru.cp1251.po\|uk.cp1251.po\|zh_CN.cp936.po\|zh_CN.po\|zh_TW.po'
|
||||||
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/po/\%('${na_po}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Rename src/ paths to src/nvim/
|
# Rename src/ paths to src/nvim/
|
||||||
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \
|
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' \
|
||||||
"$file" > "$file".tmp && mv "$file".tmp "$file"
|
"$file" > "$file".tmp && mv "$file".tmp "$file"
|
||||||
|
@ -22,16 +22,14 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
|||||||
ko.UTF-8
|
ko.UTF-8
|
||||||
nl
|
nl
|
||||||
no
|
no
|
||||||
pl
|
pl.UTF-8
|
||||||
pt_BR
|
pt_BR
|
||||||
ru
|
ru
|
||||||
sk
|
sk
|
||||||
sv
|
sv
|
||||||
uk
|
uk
|
||||||
vi
|
vi
|
||||||
zh_CN
|
|
||||||
zh_CN.UTF-8
|
zh_CN.UTF-8
|
||||||
zh_TW
|
|
||||||
zh_TW.UTF-8)
|
zh_TW.UTF-8)
|
||||||
|
|
||||||
set(NEOVIM_RELATIVE_SOURCES)
|
set(NEOVIM_RELATIVE_SOURCES)
|
||||||
@ -143,27 +141,9 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
|||||||
BuildPoIconv(cs ISO-8859-2 cp1250)
|
BuildPoIconv(cs ISO-8859-2 cp1250)
|
||||||
BuildMo(cs.cp1250)
|
BuildMo(cs.cp1250)
|
||||||
|
|
||||||
BuildPoIconv(pl ISO-8859-2 cp1250)
|
|
||||||
BuildMo(pl.cp1250)
|
|
||||||
|
|
||||||
BuildPoIconv(pl ISO-8859-2 UTF-8)
|
|
||||||
BuildMo(pl.UTF-8)
|
|
||||||
|
|
||||||
BuildPoIconv(sk ISO-8859-2 cp1250)
|
BuildPoIconv(sk ISO-8859-2 cp1250)
|
||||||
BuildMo(sk.cp1250)
|
BuildMo(sk.cp1250)
|
||||||
|
|
||||||
BuildPoIconv(ru UTF-8 cp1251)
|
|
||||||
BuildMo(ru.cp1251)
|
|
||||||
|
|
||||||
BuildPoIconv(uk UTF-8 cp1251)
|
|
||||||
BuildMo(uk.cp1251)
|
|
||||||
|
|
||||||
BuildPoIconvGeneric(ko ko.UTF-8 ko UTF-8 euc-kr)
|
|
||||||
BuildMo(ko)
|
|
||||||
|
|
||||||
BuildPoIconvGenericWithCharset(zh_CN.cp936 zh_CN zh_CN.cp936 gb2312 cp936 gbk)
|
|
||||||
BuildMo(zh_CN.cp936)
|
|
||||||
|
|
||||||
add_custom_target(update-po-nb
|
add_custom_target(update-po-nb
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/no.po ${CMAKE_CURRENT_SOURCE_DIR}/nb.po
|
${CMAKE_CURRENT_SOURCE_DIR}/no.po ${CMAKE_CURRENT_SOURCE_DIR}/nb.po
|
||||||
@ -172,15 +152,6 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG)
|
|||||||
CheckPo(nb)
|
CheckPo(nb)
|
||||||
BuildMo(nb)
|
BuildMo(nb)
|
||||||
|
|
||||||
add_executable(sjiscorr sjiscorr.c)
|
|
||||||
add_custom_target(update-po-ja.sjis
|
|
||||||
COMMAND iconv -f utf-8 -t cp932 ${CMAKE_CURRENT_SOURCE_DIR}/ja.po |
|
|
||||||
$<TARGET_FILE:sjiscorr> > ${CMAKE_CURRENT_SOURCE_DIR}/ja.sjis.po
|
|
||||||
DEPENDS ja.po sjiscorr)
|
|
||||||
list(APPEND UPDATE_PO_TARGETS update-po-ja.sjis)
|
|
||||||
CheckPo(ja.sjis)
|
|
||||||
BuildMo(ja.sjis)
|
|
||||||
|
|
||||||
foreach(LANGUAGE ${LANGUAGES})
|
foreach(LANGUAGE ${LANGUAGES})
|
||||||
set(poFile "${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE}.po")
|
set(poFile "${CMAKE_CURRENT_SOURCE_DIR}/${LANGUAGE}.po")
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
7854
src/nvim/po/ko.po
7854
src/nvim/po/ko.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
8260
src/nvim/po/pl.po
8260
src/nvim/po/pl.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
|||||||
// Simplistic program to correct SJIS inside strings.
|
|
||||||
// When a trail byte is a backslash it needs to be doubled.
|
|
||||||
// Public domain.
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
char buffer[BUFSIZ];
|
|
||||||
char *p;
|
|
||||||
|
|
||||||
while (fgets(buffer, BUFSIZ, stdin) != NULL)
|
|
||||||
{
|
|
||||||
for (p = buffer; *p != 0; p++)
|
|
||||||
{
|
|
||||||
if (strncmp(p, "charset=utf-8", 13) == 0)
|
|
||||||
{
|
|
||||||
fputs("charset=cp932", stdout);
|
|
||||||
p += 12;
|
|
||||||
}
|
|
||||||
else if (strncmp(p, "# Original translations", 23) == 0)
|
|
||||||
{
|
|
||||||
fputs("# generated from ja.po, DO NOT EDIT", stdout);
|
|
||||||
while (p[1] != '\n')
|
|
||||||
++p;
|
|
||||||
}
|
|
||||||
else if (*(unsigned char *)p == 0x81 && p[1] == '_')
|
|
||||||
{
|
|
||||||
putchar('\\');
|
|
||||||
++p;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (*p & 0x80)
|
|
||||||
{
|
|
||||||
putchar(*p++);
|
|
||||||
if (*p == '\\')
|
|
||||||
putchar(*p);
|
|
||||||
}
|
|
||||||
putchar(*p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
7928
src/nvim/po/zh_CN.po
7928
src/nvim/po/zh_CN.po
File diff suppressed because it is too large
Load Diff
7904
src/nvim/po/zh_TW.po
7904
src/nvim/po/zh_TW.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user