Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
3b562b0e
Commit
3b562b0e
authored
May 31, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lang: move translation glue into its own subdir
parent
797df667
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
23 deletions
+36
-23
Makefile
Makefile
+7
-23
Makefile
lang/Makefile
+29
-0
en_US.pot
lang/en_US.pot
+0
-0
ja_JP.po
lang/ja_JP.po
+0
-0
zh_CN.po
lang/zh_CN.po
+0
-0
No files found.
Makefile
View file @
3b562b0e
...
...
@@ -14,17 +14,18 @@ umount: force
/sbin/umount
-f
"<above>:
${
.CURDIR
}
/src"
install
:
force
# invoke pkg
(
8
)
bootstraping
@
make
-C
${
.CURDIR
}
/pkg
install
# move all sources to their destination
@
mkdir
-p
${
DESTDIR
}
/usr/local
@
cp
-r
${
.CURDIR
}
/src/
*
${
DESTDIR
}
/usr/local
# disable warnings for production systems
@
sed
-i
''
-e
's/E_STRICT/E_STRICT | E_WARNING/g'
\
${
DESTDIR
}
/usr/local/etc/rc.php_ini_setup
# invoke pkg
(
8
)
bootstraping
@
make
-C
${
.CURDIR
}
/pkg
install
# invoke translation glue
@
make
-C
${
.CURDIR
}
/lang
install
# finally pretty-print a list of files present
@
(
cd
${
.CURDIR
}
/src
;
find
*
-type
f
\
!
-name
"*.po"
!
-name
"*.pot"
)
|
\
@
(
cd
${
.CURDIR
}
/src
;
find
*
-type
f
)
|
\
xargs
-n1
printf
"/usr/local/%s
\n
"
lint
:
force
...
...
@@ -40,6 +41,8 @@ sweep: force
xargs
-0
-n1
scripts/cleanfile
find
${
.CURDIR
}
/pkg
-type
f
-print0
|
\
xargs
-0
-n1
scripts/cleanfile
find
${
.CURDIR
}
/lang
-type
f
-print0
|
\
xargs
-0
-n1
scripts/cleanfile
find
${
.CURDIR
}
/scripts
-type
f
-print0
|
\
xargs
-0
-n1
scripts/cleanfile
...
...
@@ -63,25 +66,6 @@ health: force
# check test script output and advertise a failure...
[
"
`
${
.CURDIR
}
/src/etc/rc.php_test_run
`
"
==
"FCGI-PASSED PASSED"
]
# translation glue
XGETTEXT
=
xgettext
-L
PHP
--from-code
=
UTF-8
-F
--strict
--debug
MSGFMT
=
msgfmt
--strict
LOCALEDIR
=
${
.CURDIR
}
/src/share/locale
POT
=
${
LOCALEDIR
}
/en_US/LC_MESSAGES/OPNsense.pot
PO
!=
ls
${
LOCALEDIR
}
/
*
/LC_MESSAGES/OPNsense.po
.SUFFIXES
:
.po .mo
.po.mo
:
force
${
MSGFMT
}
-o
${
.TARGET
}
${
.IMPSRC
}
bootstrap
:
${PO:S/.po/.mo/g}
translate
:
force
@
:
>
${
POT
}
scripts/translate/collect.py
find src | xargs
${
XGETTEXT
}
-j
-o
${
POT
}
clean
:
git reset
--hard
HEAD
&&
git clean
-xdqf
.
...
...
lang/Makefile
0 → 100644
View file @
3b562b0e
all
:
XGETTEXT
=
xgettext
-L
PHP
--from-code
=
UTF-8
-F
--strict
--debug
MSGFMT
=
msgfmt
--strict
LOCALEDIR
=
/usr/local/share/locale/%%LANG%%/LC_MESSAGES
LANGUAGES
=
zh_CN ja_JP
TEMPLATE
=
en_US
.for
LANG
in
${LANGUAGES}
${LANG}DIR
=
${
LOCALEDIR
:S/%%LANG%%/
${
LANG
}
/g
}
${LANG}
:
@
mkdir
-p
${
DESTDIR
}${${
LANG
}
DIR
}
@
${
MSGFMT
}
-o
${
DESTDIR
}${${
LANG
}
DIR
}
/OPNsense.mo
${
LANG
}
.po
@
echo
${${
LANG
}
DIR
}
/OPNsense.mo
.endfor
${TEMPLATE}
:
@
:
>
${
TEMPLATE
}
.pot
# XXX bring this back
#${.CURDIR}/../scripts/translate/collect.py
cd
${
.CURDIR
}
/..
&&
find src |
\
xargs
${
XGETTEXT
}
-j
-o
${
.CURDIR
}
/
${
TEMPLATE
}
.pot
install
:
${LANGUAGES}
template
:
${TEMPLATE}
.PHONY
:
${LANGUAGES} ${TEMPLATE}
src/share/locale/en_US/LC_MESSAGES/OPNsense
.pot
→
lang/en_US
.pot
View file @
3b562b0e
File moved
src/share/locale/ja_JP/LC_MESSAGES/OPNsense
.po
→
lang/ja_JP
.po
View file @
3b562b0e
File moved
src/share/locale/zh_CN/LC_MESSAGES/OPNsense
.po
→
lang/zh_CN
.po
View file @
3b562b0e
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment