Ticket #3063: tests_i18n_non-us-ascii_msgids.2.diff

File tests_i18n_non-us-ascii_msgids.2.diff, 2.3 KB (added by Antti Kaihola, 17 years ago)

Oops, diff root path was wrong. Corrected here.

  • tests/regressiontests/templates/locale/de/LC_MESSAGES/django.po

     
     1# SOME DESCRIPTIVE TITLE.
     2# Copyright (C) YEAR Free Software Foundation, Inc.
     3# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     4#
     5msgid ""
     6msgstr ""
     7"Project-Id-Version: Django 1.0\n"
     8"PO-Revision-Date: 2006-11-26 01:04+0200\n"
     9"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
     11"Content-Transfer-Encoding: 8bit\n"
     12
     13msgid "myöhä"
     14msgstr "spät"
  • tests/regressiontests/templates/tests.py

     
    1010from django.utils.translation import activate, deactivate, install
    1111from django.utils.tzinfo import LocalTimezone
    1212from datetime import datetime, timedelta
     13import os.path
    1314import unittest
    1415
    1516#################################
     
    503504            # translation of a constant string
    504505            'i18n13': ('{{ _("Page not found") }}', {'LANGUAGE_CODE': 'de'}, 'Seite nicht gefunden'),
    505506
     507            # translation of a missing non-us-ascii UTF-8 string
     508            '18n14': ('{% load i18n %}{% trans "\xc3\x84iti" %}', {'LANGUAGE_CODE': 'de'}, '\xc3\x84iti'),
     509           
     510            # translation of an existing non-us-ascii UTF-8 string
     511            '18n15': ('{% load i18n %}{% trans "my\xc3\xb6h\xc3\xa4" %}', {'LANGUAGE_CODE': 'de'}, 'sp\xc3\xa4t'),
     512
    506513            ### HANDLING OF TEMPLATE_TAG_IF_INVALID ###################################
    507514
    508515            'invalidstr01': ('{{ var|default:"Foo" }}', {}, ('Foo','INVALID')),
     
    633640        old_template_loaders = loader.template_source_loaders
    634641        loader.template_source_loaders = [test_template_loader]
    635642
     643        # Add this directory to locale search path for i18n13 and i18n14
     644        if not hasattr(settings, 'LOCALE_PATHS'):
     645            settings.LOCALE_PATHS = []
     646        settings.LOCALE_PATHS.append(os.path.join(os.path.dirname(__file__)))
     647       
    636648        failures = []
    637649        tests = TEMPLATE_TESTS.items()
    638650        tests.sort()
Back to Top