This is an automated email from the ASF dual-hosted git repository. brondsem pushed a commit to branch db/remove_i18n in repository https://gitbox.apache.org/repos/asf/allura.git
commit e9979fc5d6d1204f8ddee50b888833530e6dced4 Author: Dave Brondsema <dbronds...@slashdotmedia.com> AuthorDate: Thu Jan 4 16:19:43 2024 -0500 remove i18n, only was used a tiny bit in templates --- Allura/MANIFEST.in | 1 - Allura/allura/config/app_cfg.py | 3 +-- Allura/allura/i18n/ru/LC_MESSAGES/pyforge.po | 38 ---------------------------- Allura/allura/templates/widgets/vote.html | 5 +--- Allura/setup.cfg | 25 +----------------- Allura/setup.py | 3 +-- 6 files changed, 4 insertions(+), 71 deletions(-) diff --git a/Allura/MANIFEST.in b/Allura/MANIFEST.in index 80ad819df..56269d817 100644 --- a/Allura/MANIFEST.in +++ b/Allura/MANIFEST.in @@ -1,4 +1,3 @@ recursive-include allura/public * include allura/public/favicon.ico -recursive-include allura/i18n * recursive-include allura/templates * diff --git a/Allura/allura/config/app_cfg.py b/Allura/allura/config/app_cfg.py index ee4a74d65..33e5148c4 100644 --- a/Allura/allura/config/app_cfg.py +++ b/Allura/allura/config/app_cfg.py @@ -138,8 +138,7 @@ class AlluraJinjaRenderer(JinjaRenderer): autoescape=True, bytecode_cache=bcc, cache_size=asint(config.get('jinja_cache_size', -1)), - extensions=['jinja2.ext.do', 'jinja2.ext.i18n']) - jinja2_env.install_gettext_translations(tg.i18n) + extensions=['jinja2.ext.do']) jinja2_env.filters['datetimeformat'] = helpers.datetimeformat jinja2_env.filters['filter'] = lambda s, t=None: list(filter(t and jinja2_env.tests[t], s)) jinja2_env.filters['nl2br'] = helpers.nl2br_jinja_filter diff --git a/Allura/allura/i18n/ru/LC_MESSAGES/pyforge.po b/Allura/allura/i18n/ru/LC_MESSAGES/pyforge.po deleted file mode 100644 index 675b0c1d1..000000000 --- a/Allura/allura/i18n/ru/LC_MESSAGES/pyforge.po +++ /dev/null @@ -1,38 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Russian translations for Allura. -# -msgid "" -msgstr "" -"Project-Id-Version: ${package} 0.0.0\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2008-01-13 14:00+0200\n" -"PO-Revision-Date: 2008-01-13 14:00+0200\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: ru <l...@li.org>\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 0.9.1\n" - -#: ${package}/controllers/root.py:13 -msgid "Your application is now running" -msgstr "Ваши приложение успешно запущено" - diff --git a/Allura/allura/templates/widgets/vote.html b/Allura/allura/templates/widgets/vote.html index 3dc856bf3..ce5124b25 100644 --- a/Allura/allura/templates/widgets/vote.html +++ b/Allura/allura/templates/widgets/vote.html @@ -37,10 +37,7 @@ <span class="votes-percent">{{ artifact.votes_up_percent }}</span>% </div> <div class="fright vote-text"> - {% trans num_comments = artifact.discussion_thread.num_replies %} - {{ num_comments }} comment - {% pluralize %}{{ num_comments}} comments - {% endtrans %} + {{ h.text.plural(artifact.discussion_thread.num_replies, 'comment', 'comments') }} </div> <div style="clear:both;"></div> {% if can_vote %} diff --git a/Allura/setup.cfg b/Allura/setup.cfg index 453efd7e3..311cd7f08 100644 --- a/Allura/setup.cfg +++ b/Allura/setup.cfg @@ -24,30 +24,7 @@ max-line-length = 119 [egg_info] tag_build = dev0 -# Babel configuration -[compile_catalog] -domain = allura -directory = allura/i18n -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = allura/i18n/allura.pot -width = 80 -keywords = l_ - -[init_catalog] -domain = allura -input_file = allura/i18n/allura.pot -output_dir = allura/i18n - -[update_catalog] -domain = allura -input_file = allura/i18n/allura.pot -output_dir = allura/i18n -previous = true - [coverage:run] parallel=true concurrency=multiprocessing -source=allura,../AlluraTest/alluratest \ No newline at end of file +source=allura,../AlluraTest/alluratest diff --git a/Allura/setup.py b/Allura/setup.py index ece157874..3a3aca54d 100644 --- a/Allura/setup.py +++ b/Allura/setup.py @@ -50,8 +50,7 @@ setup( paster_plugins=['PasteScript', 'TurboGears2', 'Ming'], packages=find_packages(exclude=['ez_setup']), include_package_data=True, - package_data={'allura': ['i18n/*/LC_MESSAGES/*.mo', - 'templates/**.html', + package_data={'allura': ['templates/**.html', 'templates/**.py', 'templates/**.xml', 'templates/**.txt',