Use makefile target to generate MO file and remove it from git

This commit is contained in:
ArthurHoaro 2017-05-20 15:53:35 +02:00
parent 40ec173e68
commit d637976329
6 changed files with 102 additions and 65 deletions

1
.gitattributes vendored
View file

@ -22,6 +22,7 @@ Dockerfile text
*.ttf binary *.ttf binary
*.min.css binary *.min.css binary
*.min.js binary *.min.js binary
*.mo binary
# Exclude from Git archives # Exclude from Git archives
.editorconfig export-ignore .editorconfig export-ignore

1
.gitignore vendored
View file

@ -18,6 +18,7 @@ vendor/
# Release archives # Release archives
*.tar.gz *.tar.gz
*.zip *.zip
inc/languages/*/LC_MESSAGES/shaarli.mo
# Development and test resources # Development and test resources
coverage coverage

View file

@ -13,6 +13,8 @@ install:
- composer self-update - composer self-update
- composer install --prefer-dist - composer install --prefer-dist
- locale -a - locale -a
before_script:
- PATH=${PATH//:\.\/node_modules\/\.bin/}
script: script:
- make clean - make clean
- make check_permissions - make check_permissions

View file

@ -130,7 +130,7 @@ check_permissions:
# See phpunit.xml for configuration # See phpunit.xml for configuration
# https://phpunit.de/manual/current/en/appendixes.configuration.html # https://phpunit.de/manual/current/en/appendixes.configuration.html
## ##
test: test: translate
@echo "-------" @echo "-------"
@echo "PHPUNIT" @echo "PHPUNIT"
@echo "-------" @echo "-------"
@ -168,15 +168,15 @@ composer_dependencies: clean
composer install --no-dev --prefer-dist composer install --no-dev --prefer-dist
find vendor/ -name ".git" -type d -exec rm -rf {} + find vendor/ -name ".git" -type d -exec rm -rf {} +
### generate a release tarball and include 3rd-party dependencies ### generate a release tarball and include 3rd-party dependencies and translations
release_tar: composer_dependencies htmldoc release_tar: composer_dependencies htmldoc translate
git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD
tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/ tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/
tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/ tar rvf $(ARCHIVE_VERSION).tar --transform "s|^doc/html|$(ARCHIVE_PREFIX)doc/html|" doc/html/
gzip $(ARCHIVE_VERSION).tar gzip $(ARCHIVE_VERSION).tar
### generate a release zip and include 3rd-party dependencies ### generate a release zip and include 3rd-party dependencies and translations
release_zip: composer_dependencies htmldoc release_zip: composer_dependencies htmldoc translate
git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD
mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor} mkdir -p $(ARCHIVE_PREFIX)/{doc,vendor}
rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/ rsync -a doc/html/ $(ARCHIVE_PREFIX)doc/html/
@ -213,3 +213,8 @@ htmldoc:
mkdocs build' mkdocs build'
find doc/html/ -type f -exec chmod a-x '{}' \; find doc/html/ -type f -exec chmod a-x '{}' \;
rm -r venv rm -r venv
### Generate Shaarli's translation compiled file (.mo)
translate:
@find inc/languages/ -name shaarli.po -execdir msgfmt shaarli.po -o shaarli.mo \;

View file

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Shaarli\n" "Project-Id-Version: Shaarli\n"
"POT-Creation-Date: 2017-05-20 13:54+0200\n" "POT-Creation-Date: 2017-05-20 15:36+0200\n"
"PO-Revision-Date: 2017-05-20 14:11+0200\n" "PO-Revision-Date: 2017-05-20 15:40+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: Shaarli\n" "Language-Team: Shaarli\n"
"Language: fr_FR\n" "Language: fr_FR\n"
@ -16,17 +16,6 @@ msgstr ""
"X-Poedit-KeywordsList: t:1,2;t\n" "X-Poedit-KeywordsList: t:1,2;t\n"
"X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-0: .\n"
#: application/ApplicationUtils.php:152
#, php-format
msgid ""
"Your PHP version is obsolete! Shaarli requires at least PHP %s, and thus "
"cannot run. Your PHP version has known security vulnerabilities and should "
"be updated as soon as possible."
msgstr ""
"Votre version de PHP est obsolète ! Shaarli nécessite au moins PHP %s, et ne "
"peut donc pas fonctionner. Votre version de PHP a des failles de sécurités "
"connues et devrait être mise à jour au plus tôt."
#: application/ApplicationUtils.php:180 application/ApplicationUtils.php:192 #: application/ApplicationUtils.php:180 application/ApplicationUtils.php:192
msgid "directory is not readable" msgid "directory is not readable"
msgstr "le répertoire n'est pas accessible en lecture" msgstr "le répertoire n'est pas accessible en lecture"
@ -54,8 +43,7 @@ msgstr "Liens directs"
#: application/FeedBuilder.php:148 #: application/FeedBuilder.php:148
#: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88 #: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:242 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:177
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:245
#: tmp/paper.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88 #: tmp/paper.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88
msgid "Permalink" msgid "Permalink"
msgstr "Permalien" msgstr "Permalien"
@ -86,6 +74,7 @@ msgstr "La clé du tableau et l'ID du lien doivent être égaux."
#: application/LinkDB.php:251 #: application/LinkDB.php:251
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14 #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:45
msgid "" msgid ""
"The personal, minimalist, super-fast, database free, bookmarking service" "The personal, minimalist, super-fast, database free, bookmarking service"
msgstr "" msgstr ""
@ -153,8 +142,6 @@ msgid "The page you are trying to reach does not exist or has been deleted."
msgstr "La page que vous essayez de consulter n'existe pas ou a été supprimée." msgstr "La page que vous essayez de consulter n'existe pas ou a été supprimée."
#: application/PageBuilder.php:161 #: application/PageBuilder.php:161
#, fuzzy
#| msgid " 404 Not Found"
msgid "404 Not Found" msgid "404 Not Found"
msgstr "404 Introuvable" msgstr "404 Introuvable"
@ -208,22 +195,6 @@ msgstr "Mo"
msgid "GiB" msgid "GiB"
msgstr "Go" msgstr "Go"
#: application/config/ConfigJson.php:26
#, php-format
msgid ""
"An error occurred while parsing JSON configuration file (%s): error code #%d"
msgstr ""
"Une erreur s'est produite lors de la lecture du fichier de configuration "
"JSON (%s) : code d'erreur #%d"
#: application/config/ConfigJson.php:33
msgid ""
"Please check your JSON syntax (without PHP comment tags) using a JSON lint "
"tool such as "
msgstr ""
"Merci de vérifier la syntaxe JSON (sans les balises de commentaires PHP) en "
"utilisant un validateur de JSON tel que "
#: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:121 #: application/config/ConfigJson.php:52 application/config/ConfigPhp.php:121
msgid "" msgid ""
"Shaarli could not create the config file. Please make sure Shaarli has the " "Shaarli could not create the config file. Please make sure Shaarli has the "
@ -254,22 +225,6 @@ msgstr "Vous n'êtes pas autorisé à modifier la configuration."
msgid "Error accessing" msgid "Error accessing"
msgstr "Une erreur s'est produite en accédant à" msgstr "Une erreur s'est produite en accédant à"
#: index.php:48
msgid ""
"Error: missing Composer dependencies\n"
"\n"
"If you installed Shaarli through Git or using the development branch,\n"
"please refer to the installation documentation to install PHP dependencies "
"using Composer:\n"
msgstr ""
"Erreur : les dépendances Composer sont manquantes\n"
"\n"
"Si vous avez installé Shaarli avec Git ou depuis la branche de "
"développement\n"
"merci de consulter la documentation d'installation pour installer les "
"dépendances Composer :\n"
"\n"
#: index.php:137 #: index.php:137
msgid "Shared links on " msgid "Shared links on "
msgstr "Liens partagés sur " msgstr "Liens partagés sur "
@ -506,6 +461,23 @@ msgstr "URL de l'API Wallabag "
msgid "Wallabag API version (1 or 2)" msgid "Wallabag API version (1 or 2)"
msgstr "Version de l'API Wallabag (1 ou 2)" msgstr "Version de l'API Wallabag (1 ou 2)"
#: tests/LanguagesTest.php:186 tests/LanguagesTest.php:198
#: tests/languages/fr/LanguagesFrTest.php:148
#: tests/languages/fr/LanguagesFrTest.php:160
msgid "car"
msgid_plural "car"
msgstr[0] ""
msgstr[1] ""
#: tests/LanguagesTest.php:187 tests/LanguagesTest.php:199
#: tests/languages/fr/LanguagesFrTest.php:149
#: tests/languages/fr/LanguagesFrTest.php:161
#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:81
msgid "Search"
msgid_plural "Search"
msgstr[0] "Rechercher"
msgstr[1] "Rechercher"
#: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 #: tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13
msgid "Shaare a new link" msgid "Shaare a new link"
msgstr "Partager un nouveau lien" msgstr "Partager un nouveau lien"
@ -556,8 +528,7 @@ msgstr "Renommer"
#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 #: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35
#: tmp/editlink.90100d2eaf5d3705e14b9b4f78ecddc9.rtpl.php:60 #: tmp/editlink.90100d2eaf5d3705e14b9b4f78ecddc9.rtpl.php:60
#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71 #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:288 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:313
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
@ -727,7 +698,7 @@ msgstr "Tags"
#: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:52 #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:52
#: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 #: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:177 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:167
msgid "Private" msgid "Private"
msgstr "Privé" msgstr "Privé"
@ -885,22 +856,27 @@ msgstr "Retirer le tag"
msgid "with status" msgid "with status"
msgstr "avec le statut" msgstr "avec le statut"
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:181 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169
msgid "Edit" msgid "Edit"
msgstr "Modifier" msgstr "Modifier"
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:39
msgid "Fold" msgid "Fold"
msgstr "Replier" msgstr "Replier"
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:245 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:175
msgid "Edited: " msgid "Edited: "
msgstr "Modifié :" msgstr "Modifié :"
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:257 #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:179
msgid "permalink" msgid "permalink"
msgstr "permalien" msgstr "permalien"
#: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:181
msgid "Add tag"
msgstr "Ajouter un tag"
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:7 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:7
msgid "Filters" msgid "Filters"
msgstr "Filtres" msgstr "Filtres"
@ -909,6 +885,11 @@ msgstr "Filtres"
msgid "Filter private links" msgid "Filter private links"
msgstr "Filtrer par liens privés" msgstr "Filtrer par liens privés"
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:18
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:40
msgid "Fold all"
msgstr "Replier tout"
#: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:63 #: tmp/linklist.paging.cedf684561d925457130839629000a81.rtpl.php:63
msgid "Links per page" msgid "Links per page"
msgstr "Liens par page" msgstr "Liens par page"
@ -933,6 +914,7 @@ msgid "Remember me"
msgstr "Rester connecté" msgstr "Rester connecté"
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14 #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:14
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:45
msgid "by the Shaarli community" msgid "by the Shaarli community"
msgstr "par la communauté Shaarli" msgstr "par la communauté Shaarli"
@ -940,6 +922,18 @@ msgstr "par la communauté Shaarli"
msgid "Documentation" msgid "Documentation"
msgstr "Documentation" msgstr "Documentation"
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:41
msgid "Expand"
msgstr "Déplier"
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42
msgid "Expand all"
msgstr "Déplier tout"
#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:43
msgid "Are you sure you want to delete this link?"
msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?"
#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31
msgid "Tools" msgid "Tools"
msgstr "Outils" msgstr "Outils"
@ -968,10 +962,6 @@ msgstr "Flux RSS"
msgid "Logout" msgid "Logout"
msgstr "Déconnexion" msgstr "Déconnexion"
#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:81
msgid "Search"
msgstr "Rechercher"
#: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:171 #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:171
msgid "is available" msgid "is available"
msgstr "est disponible" msgstr "est disponible"
@ -1198,6 +1188,44 @@ msgstr ""
"Glisser ce lien dans votre barre de favoris ou cliquer droit dessus et « " "Glisser ce lien dans votre barre de favoris ou cliquer droit dessus et « "
"Ajouter aux favoris »" "Ajouter aux favoris »"
#~ msgid ""
#~ "Your PHP version is obsolete! Shaarli requires at least PHP %s, and thus "
#~ "cannot run. Your PHP version has known security vulnerabilities and "
#~ "should be updated as soon as possible."
#~ msgstr ""
#~ "Votre version de PHP est obsolète ! Shaarli nécessite au moins PHP %s, et "
#~ "ne peut donc pas fonctionner. Votre version de PHP a des failles de "
#~ "sécurités connues et devrait être mise à jour au plus tôt."
#~ msgid ""
#~ "An error occurred while parsing JSON configuration file (%s): error code #"
#~ "%d"
#~ msgstr ""
#~ "Une erreur s'est produite lors de la lecture du fichier de configuration "
#~ "JSON (%s) : code d'erreur #%d"
#~ msgid ""
#~ "Please check your JSON syntax (without PHP comment tags) using a JSON "
#~ "lint tool such as "
#~ msgstr ""
#~ "Merci de vérifier la syntaxe JSON (sans les balises de commentaires PHP) "
#~ "en utilisant un validateur de JSON tel que "
#~ msgid ""
#~ "Error: missing Composer dependencies\n"
#~ "\n"
#~ "If you installed Shaarli through Git or using the development branch,\n"
#~ "please refer to the installation documentation to install PHP "
#~ "dependencies using Composer:\n"
#~ msgstr ""
#~ "Erreur : les dépendances Composer sont manquantes\n"
#~ "\n"
#~ "Si vous avez installé Shaarli avec Git ou depuis la branche de "
#~ "développement\n"
#~ "merci de consulter la documentation d'installation pour installer les "
#~ "dépendances Composer :\n"
#~ "\n"
#~ msgid "Sessions do not seem to work correctly on your server." #~ msgid "Sessions do not seem to work correctly on your server."
#~ msgstr "Les sessions ne semblent " #~ msgstr "Les sessions ne semblent "