aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--app/views/layouts/application.html.erb16
-rw-r--r--config/locales/ca.yml4
-rw-r--r--config/locales/en.yml4
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 @@
<!DOCTYPE html>
-<html>
+<html lang="<%= I18n.default_locale %>">
<head>
<title><%= ENV.fetch('OPERUM_BASE_TITLE', 'Operum') %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta name="author" content="Miquel Sabaté Solà">
+
+ <meta name="description" content="<%= I18n.t('meta.description') %>">
+ <% if I18n.default_locale == :ca %>
+ <meta property="og:locale" content="ca_ES" />
+ <% else %>
+ <meta property="og:locale" content="en_US" />
+ <% end %>
+ <meta property="og:url" content="https://github.com/mssola/operum" />
+ <meta property="og:title" content="<%= ENV.fetch('OPERUM_BASE_TITLE', 'Operum') %>" />
+ <meta property="og:description" content="<%= I18n.t('meta.description') %>" />
+
+ <link rel="alternate" hreflang="<%= I18n.default_locale %>" href="<%= request.base_url %>">
+
<%= 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