[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [community/slideshow] reduce locales in config, correct .htaccess file to prevent 404s, make model translatable



commit 86478c3023a91203299c65477e6e0df542651b98
Author: emma peel <emma.peel@xxxxxxxxxx>
Date:   Thu Mar 25 08:10:43 2021 +0100

    reduce locales in config, correct .htaccess file to prevent 404s, make model translatable
---
 .htaccess                 | 2 +-
 community.lektorproject   | 8 ++++----
 configs/i18n.ini          | 2 +-
 databags/alternatives.ini | 6 +++---
 models/page.ini           | 1 +
 models/text.ini           | 2 ++
 6 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/.htaccess b/.htaccess
index 548371a..1e7a96d 100644
--- a/.htaccess
+++ b/.htaccess
@@ -9,7 +9,7 @@ RewriteRule ^(en|en-US)$ / [R=302,L]
 RewriteRule ^(en|en-US)/(.*) /$2 [R=302,L]
 
 # Rewrites for languages that have a different mapping in the page than in TBB
-RewriteRule ^(es-ES|es-MX|es-CO)(.*) /es$2 [R=302,L]
+RewriteRule ^(es-ES|es-MX|es-CO|es-AR)(.*) /es$2 [R=302,L]
 
 # we have only one translation for this locales
 RewriteRule ^(bn-BD|bn-IN)(.*) /bn$2 [R=302,L]
diff --git a/community.lektorproject b/community.lektorproject
index 1725581..b933b44 100644
--- a/community.lektorproject
+++ b/community.lektorproject
@@ -10,8 +10,8 @@ primary = yes
 url_prefix = /
 locale = en
 
-[alternatives.es-AR]
-name = Español Arg (es-AR)
+[alternatives.es]
+name = Español (es)
 primary = yes
-url_prefix = /es-AR/
-locale = es-AR
+url_prefix = /es/
+locale = es
diff --git a/configs/i18n.ini b/configs/i18n.ini
index 38f6d4b..53c9865 100644
--- a/configs/i18n.ini
+++ b/configs/i18n.ini
@@ -1,5 +1,5 @@
 content = en
-translations = es,es-AR,de,fr,it,pt-BR,ru
+translations = es
 i18npath = i18n
 translate_paragraphwise = False
 url_prefix = https://community.torproject.org/
diff --git a/databags/alternatives.ini b/databags/alternatives.ini
index 1bd9fd2..f2a0d37 100644
--- a/databags/alternatives.ini
+++ b/databags/alternatives.ini
@@ -4,8 +4,8 @@ order = order-last
 url =  /
 language = English (en)
 
-[es-AR]
+[es]
 direction = text-left
 order = order-last
-url = /es-AR/
-language = Español Arg. (es-AR)
+url = /es/
+language = Español
diff --git a/models/page.ini b/models/page.ini
index 0671112..61ad278 100644
--- a/models/page.ini
+++ b/models/page.ini
@@ -15,6 +15,7 @@ translate = True
 [fields.section]
 label = Section
 type = string
+translate = True
 
 [fields.cta]
 label = Call To Action
diff --git a/models/text.ini b/models/text.ini
index 75e24ba..380668d 100644
--- a/models/text.ini
+++ b/models/text.ini
@@ -1,7 +1,9 @@
 [model]
 name = Text
 label = Text
+translate = True
 
 [fields.body]
 label = Body
 type = text
+translate = True



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits