From a3ad9d03bb2b3d4c83acac97180978cbd7ed644a Mon Sep 17 00:00:00 2001 From: Avris Date: Mon, 28 Sep 2020 17:51:26 +0200 Subject: [PATCH] #59 move strings to translations, use symlink to select locale --- .gitignore | 3 +- README.md | 3 +- components/About.vue | 55 -------- components/Footer.vue | 9 +- components/Header.vue | 14 +- components/Homepage.vue | 2 +- components/LinkedText.vue | 25 +++- components/Links.vue | 2 +- components/Literature.vue | 8 +- components/Media.vue | 2 +- components/NormativeBadge.vue | 2 +- components/NotFound.vue | 4 +- components/NounSubmitForm.vue | 36 ++--- components/Share.vue | 2 +- components/Socials.vue | 2 +- components/T.vue | 16 +-- data/pl/translations.suml | 5 - {data => locale/pl}/examples.tsv | 30 ++-- {data => locale/pl}/nounTemplates.tsv | 0 {data => locale/pl}/sources.tsv | 174 +++++++++++------------ {data => locale/pl}/templateGroups.tsv | 0 {data => locale/pl}/templates.tsv | 46 +++---- locale/pl/translations.suml | 183 +++++++++++++++++++++++++ nuxt.config.js | 8 +- pages/_.vue | 19 +-- pages/dowolne.vue | 18 ++- pages/index.vue | 56 ++++---- pages/kontakt.vue | 6 +- pages/literatura.vue | 41 +++--- pages/neutratywy.vue | 61 +++------ plugins/plugin-translate.js | 6 + server/banner.js | 3 +- server/translations.js | 3 + src/classes.js | 18 +-- src/translator.js | 14 ++ 35 files changed, 502 insertions(+), 374 deletions(-) delete mode 100644 components/About.vue delete mode 100644 data/pl/translations.suml rename {data => locale/pl}/examples.tsv (99%) rename {data => locale/pl}/nounTemplates.tsv (100%) rename {data => locale/pl}/sources.tsv (99%) rename {data => locale/pl}/templateGroups.tsv (100%) rename {data => locale/pl}/templates.tsv (99%) create mode 100644 locale/pl/translations.suml create mode 100644 plugins/plugin-translate.js create mode 100644 server/translations.js create mode 100644 src/translator.js diff --git a/.gitignore b/.gitignore index 48370ec6..04927aff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -/data/db.sqlite +/data +/locale/*/db.sqlite /daemonise.json /daemonise.log diff --git a/README.md b/README.md index 10085c23..3cba9be9 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ $ yarn install # configure environment $ cp .env.dist .env $ nano .env +$ ln -s locale/pl data # or other locale $ node server/initDb.js # serve with hot reload at localhost:3000 @@ -26,5 +27,5 @@ For detailed explanation on how things work, check out [Nuxt.js docs](https://nu ## Copyright - * **Author:** Andrea Prusinowski [(Avris.it)](https://avris.it) + * **Author:** Andrea [(Avris.it)](https://avris.it) * **Licence:** [MIT](https://mit.avris.it) diff --git a/components/About.vue b/components/About.vue deleted file mode 100644 index 558a3c4e..00000000 --- a/components/About.vue +++ /dev/null @@ -1,55 +0,0 @@ - diff --git a/components/Footer.vue b/components/Footer.vue index ca80b90b..8a527e32 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -4,22 +4,19 @@

- Autorza strony: + contact.authors:

- Kod jest - udostępniony - na licencji - MIT. + footer.source

- Kontakt, social media, wsparcie: + footer.links:

diff --git a/components/Header.vue b/components/Header.vue index 6168c6b0..362f2596 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -3,7 +3,7 @@

- Zaimki.pl + title

@@ -27,15 +27,17 @@