From cf218777a2019753462084a5ceec7ca0457b9f65 Mon Sep 17 00:00:00 2001 From: Changwoo Ryu Date: Sat, 10 Aug 2019 22:13:15 +0900 Subject: intltool to gettext migration https://wiki.gnome.org/Initiatives/GnomeGoals/GettextMigration --- autogen.sh | 8 +------ configure.ac | 3 ++- data/keyboards/Makefile.am | 29 +++++++++++++++++-------- data/keyboards/hangul-keyboard-2.xml.template | 2 +- data/keyboards/hangul-keyboard-2y.xml.template | 2 +- data/keyboards/hangul-keyboard-32.xml.template | 2 +- data/keyboards/hangul-keyboard-39.xml.template | 2 +- data/keyboards/hangul-keyboard-3f.xml.template | 2 +- data/keyboards/hangul-keyboard-3s.xml.template | 2 +- data/keyboards/hangul-keyboard-3y.xml.template | 2 +- data/keyboards/hangul-keyboard-ahn.xml.template | 2 +- data/keyboards/hangul-keyboard-ro.xml.template | 2 +- data/keyboards/its/hangul-keyboard.its | 9 ++++++++ data/keyboards/its/hangul-keyboard.loc | 10 +++++++++ 14 files changed, 51 insertions(+), 26 deletions(-) create mode 100644 data/keyboards/its/hangul-keyboard.its create mode 100644 data/keyboards/its/hangul-keyboard.loc diff --git a/autogen.sh b/autogen.sh index 97617b2..f25a6ee 100755 --- a/autogen.sh +++ b/autogen.sh @@ -3,14 +3,8 @@ test -f ChangeLog || touch ChangeLog -libtoolize=`which glibtoolize` -if test -z "$libtoolize"; then - libtoolize=libtoolize -fi - -intltoolize --copy --force -$libtoolize --automake --copy --force aclocal $ACLOCAL_AMFLAGS +autoreconf --force --install autoheader automake --add-missing --copy autoconf diff --git a/configure.ac b/configure.ac index 80ee216..369f904 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,8 @@ AC_SUBST(LIBHANGUL_CURRENT) AC_SUBST(LIBHANGUL_REVISION) AC_SUBST(LIBHANGUL_AGE) -IT_PROG_INTLTOOL +AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_GNU_GETTEXT([external]) # Checks for programs. AC_PROG_CC diff --git a/data/keyboards/Makefile.am b/data/keyboards/Makefile.am index 12b5459..15db898 100644 --- a/data/keyboards/Makefile.am +++ b/data/keyboards/Makefile.am @@ -26,22 +26,35 @@ EXTRA_DIST = \ hangul-keyboard-ahn.xml.template \ hangul-combination-default.xml \ hangul-combination-full.xml \ + its/hangul-keyboard.its \ + its/hangul-keyboard.loc \ $(NULL) -# intltool로 xml 파일을 번역하면 주석이 모두 사라지고 attr의 순서도 -# 재정렬된다. 이를 방지하고자 name 부분만 별도의 name.xml로 만들어 +# its 폴더의 *.its, *.loc rule을 사용하기 위해 GETTEXTDATADIRS 지정 +MSGFMT_COMMAND = env GETTEXTDATADIRS=$(srcdir) $(MSGFMT) + +# msgfmt으로 xml 파일을 번역하면 들여쓰기 크기가 바뀌고 같은 줄에 달린 주석 +# 앞에 줄바꿈이 추가된다. 이를 방지하고자 root node와 name 부분만 별도의 +# name.xml로 만들어 (msgfmt 입출력은 valid XML만 가능하므로 root node도 포함.) # 번역한후 template과 name.xml을 병합하여 키보드 xml 파일을 생성한다. hangul-keyboard-%.xml: hangul-keyboard-%.name.xml hangul-keyboard-%.xml.template - sed -i -e '1 D' -e 's/^/r $<' \ - -e '/<_name>/a\ ' \ - -e '/<_name>/D' \ + -e '//r $<' \ + -e '//D' \ $(srcdir)/$@.template > $@ hangul-keyboard-%.name.xml.in: hangul-keyboard-%.xml.template grep "xml version=" $< > $@ - grep "<_name>" $< >> $@ + grep "> $@ + grep "" $< >> $@ + grep "> $@ + +hangul-keyboard-%.name.xml: hangul-keyboard-%.name.xml.in Makefile + $(AM_V_GEN)$(MSGFMT_COMMAND) --xml --template $< -d $(top_srcdir)/po -o $@ CLEANFILES = \ hangul-keyboard-2.xml \ @@ -54,5 +67,3 @@ CLEANFILES = \ hangul-keyboard-ro.xml \ hangul-keyboard-ahn.xml \ $(NULL) - -@INTLTOOL_XML_RULE@ diff --git a/data/keyboards/hangul-keyboard-2.xml.template b/data/keyboards/hangul-keyboard-2.xml.template index a4a0117..2f3d565 100644 --- a/data/keyboards/hangul-keyboard-2.xml.template +++ b/data/keyboards/hangul-keyboard-2.xml.template @@ -1,7 +1,7 @@ - <_name>Dubeolsik + Dubeolsik diff --git a/data/keyboards/hangul-keyboard-2y.xml.template b/data/keyboards/hangul-keyboard-2y.xml.template index c94846f..53fabf0 100644 --- a/data/keyboards/hangul-keyboard-2y.xml.template +++ b/data/keyboards/hangul-keyboard-2y.xml.template @@ -1,7 +1,7 @@ - <_name>Dubeolsik Yetgeul + Dubeolsik Yetgeul diff --git a/data/keyboards/hangul-keyboard-32.xml.template b/data/keyboards/hangul-keyboard-32.xml.template index 5920069..fe36a3b 100644 --- a/data/keyboards/hangul-keyboard-32.xml.template +++ b/data/keyboards/hangul-keyboard-32.xml.template @@ -1,7 +1,7 @@ - <_name>Sebeolsik Dubeol Layout + Sebeolsik Dubeol Layout diff --git a/data/keyboards/hangul-keyboard-39.xml.template b/data/keyboards/hangul-keyboard-39.xml.template index 78cfb50..5b06241 100644 --- a/data/keyboards/hangul-keyboard-39.xml.template +++ b/data/keyboards/hangul-keyboard-39.xml.template @@ -1,7 +1,7 @@ - <_name>Sebeolsik 390 + Sebeolsik 390 diff --git a/data/keyboards/hangul-keyboard-3f.xml.template b/data/keyboards/hangul-keyboard-3f.xml.template index c563df9..9fdc4d4 100644 --- a/data/keyboards/hangul-keyboard-3f.xml.template +++ b/data/keyboards/hangul-keyboard-3f.xml.template @@ -1,7 +1,7 @@ - <_name>Sebeolsik Final + Sebeolsik Final diff --git a/data/keyboards/hangul-keyboard-3s.xml.template b/data/keyboards/hangul-keyboard-3s.xml.template index 5a95490..1c88a62 100644 --- a/data/keyboards/hangul-keyboard-3s.xml.template +++ b/data/keyboards/hangul-keyboard-3s.xml.template @@ -1,7 +1,7 @@ - <_name>Sebeolsik Noshift + Sebeolsik Noshift diff --git a/data/keyboards/hangul-keyboard-3y.xml.template b/data/keyboards/hangul-keyboard-3y.xml.template index 67f0ae9..19d665b 100644 --- a/data/keyboards/hangul-keyboard-3y.xml.template +++ b/data/keyboards/hangul-keyboard-3y.xml.template @@ -1,7 +1,7 @@ - <_name>Sebeolsik Yetgeul + Sebeolsik Yetgeul diff --git a/data/keyboards/hangul-keyboard-ahn.xml.template b/data/keyboards/hangul-keyboard-ahn.xml.template index 0fa4d3c..04aa9ad 100644 --- a/data/keyboards/hangul-keyboard-ahn.xml.template +++ b/data/keyboards/hangul-keyboard-ahn.xml.template @@ -1,7 +1,7 @@ - <_name>Ahnmatae + Ahnmatae diff --git a/data/keyboards/hangul-keyboard-ro.xml.template b/data/keyboards/hangul-keyboard-ro.xml.template index 0f40813..4bf231b 100644 --- a/data/keyboards/hangul-keyboard-ro.xml.template +++ b/data/keyboards/hangul-keyboard-ro.xml.template @@ -1,7 +1,7 @@ - <_name>Romaja + Romaja diff --git a/data/keyboards/its/hangul-keyboard.its b/data/keyboards/its/hangul-keyboard.its new file mode 100644 index 0000000..b62f4f5 --- /dev/null +++ b/data/keyboards/its/hangul-keyboard.its @@ -0,0 +1,9 @@ + + + + + + diff --git a/data/keyboards/its/hangul-keyboard.loc b/data/keyboards/its/hangul-keyboard.loc new file mode 100644 index 0000000..7705c5d --- /dev/null +++ b/data/keyboards/its/hangul-keyboard.loc @@ -0,0 +1,10 @@ + + + + + + + -- cgit v1.2.1