File tree Expand file tree Collapse file tree 6 files changed +82
-0
lines changed Expand file tree Collapse file tree 6 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 1
1
/src /po /* .po.bak
2
2
/src /po /* .po.old
3
3
/src /po /vim.pot
4
+ /src /po /sjiscorr.exe
5
+ /src /po /sjiscorr
Original file line number Diff line number Diff line change
1
+ MASTER_MENU = menu_ja_jp.utf-8.vim
2
+
3
+ default : menu_ja_jp.euc-jp.vim menu_japanese_japan.932.vim
4
+
5
+ menu_ja_jp.euc-jp.vim : $(MASTER_MENU )
6
+ iconv -f utf-8 -t euc-jp $< | \
7
+ sed -e ' s/^scriptencoding utf-8/scriptencoding euc-jp/' -e ' s/Menu Translations:\tJapanese (UTF-8)/Menu Translations:\tJapanese (EUC-JP)/' > $@
8
+
9
+ menu_japanese_japan.932.vim : $(MASTER_MENU )
10
+ iconv -f utf-8 -t cp932 $< | \
11
+ sed -e ' s/^scriptencoding utf-8/scriptencoding cp932/' -e ' s/Menu Translations:\tJapanese (UTF-8)/Menu Translations:\tJapanese (CP932)/' > $@
Original file line number Diff line number Diff line change 5
5
" Last Change: 28-Jan-2016.
6
6
"
7
7
" Copyright (C) 2016 vim-jp (http://vim-jp.org/)
8
+ "
8
9
" THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
9
10
10
11
" Quit when menu translations have already been done.
Original file line number Diff line number Diff line change
1
+ default : ja.sjis.po ja.euc-jp.po
2
+
3
+ ja.sjis.po : ja.po
4
+ @$(MAKE ) sjiscorr
5
+ rm -f ja.sjis.po
6
+ iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po
7
+
8
+ ja.euc-jp.po : ja.po
9
+ iconv -f utf-8 -t euc-jp ja.po | \
10
+ sed -e ' s/charset=utf-8/charset=euc-jp/' -e ' s/# Original translations/# Generated from ja.po, DO NOT EDIT/' > ja.euc-jp.po
11
+
12
+ sjiscorr : sjiscorr.c
13
+ $(CC ) -o sjiscorr sjiscorr.c
14
+
15
+ clean :
16
+ rm -f sjiscorr sjiscorr.exe
Original file line number Diff line number Diff line change 4
4
# Do ":help credits" in Vim to see a list of people who contributed.
5
5
#
6
6
# Copyright (C) 2016 vim-jp (http://vim-jp.org/)
7
+ #
7
8
# THIS FILE IS DISTRIBUTED UNDER THE VIM LICENSE.
8
9
#
10
+ # Original translations.
11
+ #
9
12
msgid ""
10
13
msgstr ""
11
14
"Project-Id-Version : Vim 7.4\n "
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Simplistic program to correct SJIS inside strings. When a trail byte is a
3
+ * backslash it needs to be doubled.
4
+ * Public domain.
5
+ */
6
+ #include <stdio.h>
7
+ #include <string.h>
8
+
9
+ int
10
+ main (argc , argv )
11
+ int argc ;
12
+ char * * argv ;
13
+ {
14
+ char buffer [BUFSIZ ];
15
+ char * p ;
16
+
17
+ while (fgets (buffer , BUFSIZ , stdin ) != NULL )
18
+ {
19
+ for (p = buffer ; * p != 0 ; p ++ )
20
+ {
21
+ if (strncmp (p , "charset=utf-8" , 13 ) == 0 )
22
+ {
23
+ fputs ("charset=cp932" , stdout );
24
+ p += 12 ;
25
+ }
26
+ else if (strncmp (p , "# Original translations" , 23 ) == 0 )
27
+ {
28
+ fputs ("# generated from ja.po, DO NOT EDIT" , stdout );
29
+ while (p [1 ] != '\n' )
30
+ ++ p ;
31
+ }
32
+ else if (* (unsigned char * )p == 0x81 && p [1 ] == '_' )
33
+ {
34
+ putchar ('\\' );
35
+ ++ p ;
36
+ }
37
+ else
38
+ {
39
+ if (* p & 0x80 )
40
+ {
41
+ putchar (* p ++ );
42
+ if (* p == '\\' )
43
+ putchar (* p );
44
+ }
45
+ putchar (* p );
46
+ }
47
+ }
48
+ }
49
+ }
You can’t perform that action at this time.
0 commit comments