diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-10-06 18:05:56 -0400 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2018-10-10 12:21:15 +0200 |
commit | c7090c5c0be21ab656e907c35d8828421ecf7eef (patch) | |
tree | 3a8f87b914afdb33856ce3d781f187a016c14300 /tests/make-test-app.sh | |
parent | 1709f3bc1ba04b25396dcb5fe7001a14d3f722ac (diff) | |
download | flatpak-c7090c5c0be21ab656e907c35d8828421ecf7eef.tar.gz |
tests: Generate a .Locale extension
Give the test app a Locale extension, so we can test
things around related refs and subpaths. Fix up the
library tests to work with a related ref in the repo.
Diffstat (limited to 'tests/make-test-app.sh')
-rwxr-xr-x | tests/make-test-app.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh index 1bd06c80..4c0b7840 100755 --- a/tests/make-test-app.sh +++ b/tests/make-test-app.sh @@ -25,6 +25,11 @@ cat > ${DIR}/metadata <<EOF name=$APP_ID runtime=org.test.Platform/$ARCH/master sdk=org.test.Platform/$ARCH/master + +[Extension org.test.Hello.Locale] +directory=share/runtime/locale +autodelete=true +locale-subset=true EOF mkdir -p ${DIR}/files/bin @@ -77,7 +82,36 @@ else collection_args= fi +mkdir -p ${DIR}/files/share/runtime/locale + flatpak build-finish --command=hello.sh ${DIR} mkdir -p repos flatpak build-export ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR} rm -rf ${DIR} + +# build a locale extension + +DIR=`mktemp -d` + +# Init dir +cat > ${DIR}/metadata <<EOF +[Runtime] +name=${APP_ID}.Locale + +[ExtensionOf] +ref=app/$APP_ID/$ARCH/master +EOF + +cat > de.po <<EOF +msgid "Hello world" +msgstr "Hallo Welt" +EOF +mkdir -p ${DIR}/files/share/locale/de/LC_MESSAGES +msgfmt --output-file ${DIR}/files/share/locale/de/LC_MESSAGES/helloworld.mo de.po + +flatpak build-finish ${DIR} +mkdir -p repos +flatpak build-export ${collection_args} ${GPGARGS-} ${EXPORT_ARGS-} ${REPO} ${DIR} +rm -rf ${DIR} + + |