Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:mozilla/kuma
Browse files Browse the repository at this point in the history
  • Loading branch information
lmorchard committed Jun 14, 2012
2 parents 3feaaef + 36ce01f commit ef16f17
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 21 deletions.
4 changes: 3 additions & 1 deletion apps/wiki/views.py
Expand Up @@ -1052,7 +1052,9 @@ def autosuggest_documents(request):
# TODO: isolate to just approved docs?
docs = (Document.objects.filter(title__icontains=partial_title,
is_template=0,
locale=request.locale))
locale=request.locale).
exclude(title__iregex=r'Redirect [0-9]+$').
order_by('title'))

docs_list = []
for d in docs:
Expand Down
36 changes: 18 additions & 18 deletions configs/htaccess
Expand Up @@ -5,24 +5,24 @@
ReWriteEngine On
RewriteBase /

RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mwc/?)$ /apps [NC,PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/?)?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?addons/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?demos.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?docs.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?users.*/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mobile/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mozilla/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?search/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?web/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?apps.*)$ /mwsgi/$1 [NC,PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?learn.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?promote.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?events.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?profiles?.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?discussions.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?forum-archive.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?jsi18n.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mwc/?)$ /apps [NC,PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/?)?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?addons/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?demos.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?docs.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?users.*/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mobile/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?mozilla/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?search/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?web/?)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?apps.*)$ /mwsgi/$1 [NC,PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?learn.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?promote.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?events.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?profiles?.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?discussions.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?forum-archive.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(((en-US|de|el|es|fr|fy-NL|ga|ga-IE|he|hr|hu|id|it|ja|ko|nl|pl|pt-BR|pt-PT|ro|ru|sl|sq|th|x-testing|zh-TW|zh-CN)/)?jsi18n.*)$ /mwsgi/$1 [PT,L]
RewriteRule ^(admin(/.*)?)$ /mwsgi/$1 [PT,L]


Expand Down
20 changes: 19 additions & 1 deletion docs/localization.rst
Expand Up @@ -2,7 +2,7 @@
Localization
============

Kitsune is localized with `gettext <http://www.gnu.org/software/gettext/>`_.
Kuma is localized with `gettext <http://www.gnu.org/software/gettext/>`_.
User-facing strings in the code or templates need to be marked for gettext
localization.

Expand Down Expand Up @@ -278,3 +278,21 @@ Updating strings is pretty easy. Check out the localizations as above, then::
$ python manage.py verbatimize --rename

Congratulations! You've now updated the POT file.

Now commit the POT file to svn::

$ cd locale
$ svn up
$ svn ci -m "MDN string update YYYY-MM-DD"

After committing, update the `templates in Verbatim
<https://localize.mozilla.org/templates/mdn/>`_ from SVN.

![Updating verbatim templates from
SVN](https://dl.dropbox.com/u/21969365/images/templates_mdn.png)

After updating the templates in Verbatim, `update each language
<https://localize.mozilla.org/projects/mdn/admin.html>`_ from the templates.

![Updating messages from
templates](https://dl.dropbox.com/u/21969365/images/mdn_admin_update.png)
14 changes: 14 additions & 0 deletions media/css/mdn-screen.css
Expand Up @@ -1120,3 +1120,17 @@ li.tag-expert label:hover { border-color: #bbb; }

/* @Utility Classes *********/
.hidden { display: none; }


/* RTL Classes *********/

/* need to shift around the header */
.html-rtl #nav { float: right; margin: 0 70px 6px 0; font: 200 18px/1 "Bebas Neue", "League Gothic", "Arial Narrow", Arial, Helvetica, sans-serif; text-transform: uppercase; letter-spacing: .5px; }
.html-rtl #branding { position: absolute; right: 10px; top: 10px; width: 50%; padding: 2px 70px 0 0; margin: 0 0 10px; }
.html-rtl #logo img { position: absolute; right: -3px; top: -4px; }
.html-rtl #masthead .user-state { left: 150px; right: auto; }
.html-rtl .user-state li + li { padding-right: 10px; margin-right: 8px; margin-left:0; padding-left:0; border-right: 1px solid #666; border-left: 0; }
.html-rtl #masthead #tabzilla { position: absolute; left: 0; top: 0; right: auto; }

.html-rtl #welcome-close { right: auto; left: 15px; }
.html-rtl #welcome-open { right: auto; left: 10px; }
2 changes: 1 addition & 1 deletion settings.py
Expand Up @@ -105,7 +105,7 @@
'ca', 'fy-NL', 'ga-IE', 'he', 'hr', 'hu', 'id', 'it', 'ja',
'ka', 'ko', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sq',
'th', 'tr', 'vi', 'zh-CN', 'zh-TW')
RTL_LANGUAGES = None # ('ar', 'fa', 'fa-IR', 'he')
RTL_LANGUAGES = ('ar', 'fa', 'fa-IR', 'he')

DEV_POOTLE_PRODUCT_DETAILS_MAP = {
'pt': 'pt-PT',
Expand Down

0 comments on commit ef16f17

Please sign in to comment.