From 7288a8d7e0d6ae7ead5d3dc8ceccbd877ee7a309 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 14 Mar 2024 21:52:08 +0100 Subject: Sorting out attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- README.md | 12 ++++++------ app/views/layouts/application.html.erb | 16 +++++++++++++++- config/locales/ca.yml | 4 ++++ config/locales/en.yml | 4 ++++ 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b6b937a..6434db9 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ this done. After building the image, remember that: 1. You need to provide a `RAILS_MASTER_KEY`, just like any other Rails application. 2. You need to create a Docker volume for the `/rails/storage` path. This path - will contain the SQLite3 database, and so you need this to persist across + will contain the SQLite3 database and thus you need this to persist across deployments. Oh, yeah, we are using SQLite3 in production, no biggie! For the use case of @@ -53,12 +53,12 @@ want to touch: - `OPERUM_BASE_TITLE`: the title that is going to be shown for the application. By default this is set to be just `Operum`. - `OPERUM_DEFAULT_LOCALE`: that's right, this application supports multiple - languages! For now these languages are Catalan and English (but other - languages are also welcomed, just hit me with a + languages! For now these languages are catalan and english but other languages + are also welcome, just hit me with a [PR](https://github.com/mssola/operum/pulls) and take a look at the files - under `config/locales`), and if you set this environment variable you need to - provide the code (i.e. `en` for english and `ca` for catalan). By default this - application uses catalan. + under `config/locales`. You can change the default locale (catalan) by setting + this environment variable with the language code for it (i.e. `en` for + english). ## Contributing diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6042f43..1027dd4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,8 +1,22 @@ - + <%= ENV.fetch('OPERUM_BASE_TITLE', 'Operum') %> + + + + <% if I18n.default_locale == :ca %> + + <% else %> + + <% end %> + + + + + + <%= csrf_meta_tags %> <%= csp_meta_tag %> diff --git a/config/locales/ca.yml b/config/locales/ca.yml index eb8cb13..09e90bf 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -43,6 +43,10 @@ ca: ## # App-specific strings. + meta: + description: | + Gestiona les teves fonts (p.e. llibres, articles), afegeix-hi notes, etiqueta-les. Agrupa la teva bibliografia en grups que tenen sentit per a tu i que pot ser exportada i utilitzada en els projectes que estàs treballant. + general: sure: N'estàs segur? edit: edita diff --git a/config/locales/en.yml b/config/locales/en.yml index 764b6d4..c1b0d07 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -43,6 +43,10 @@ en: ## # App-specific strings. + meta: + description: | + Keep track of all your sources (i.e. books, papers, articles), add notes and tag them. Handle your bibliography with groups that make sense to you and that can be exported and used on the projects you care and are working on. + general: sure: Are you sure? edit: edit -- cgit v1.2.3