Skip to content

Commit

Permalink
Merge pull request #58 from snj/locale-ja
Browse files Browse the repository at this point in the history
Add japanese locale
  • Loading branch information
asfaltboy authored Sep 29, 2017
2 parents 4c88ea3 + 3e6048b commit d7acb36
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 9 deletions.
7 changes: 4 additions & 3 deletions advanced_filters/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,18 @@ class AdvancedFilterQueryForm(CleanWhiteSpacesMixin, forms.Form):
)

field = forms.ChoiceField(required=True, widget=forms.Select(
attrs={'class': 'query-field'}))
attrs={'class': 'query-field'}), label=_('Field'))
operator = forms.ChoiceField(
label=_('Operator'),
required=True, choices=OPERATORS, initial="iexact",
widget=forms.Select(attrs={'class': 'query-operator'}))
value = VaryingTypeCharField(required=True, widget=forms.TextInput(
attrs={'class': 'query-value'}))
attrs={'class': 'query-value'}), label=_('Value'))
value_from = forms.DateTimeField(widget=forms.HiddenInput(
attrs={'class': 'query-dt-from'}), required=False)
value_to = forms.DateTimeField(widget=forms.HiddenInput(
attrs={'class': 'query-dt-to'}), required=False)
negate = forms.BooleanField(initial=False, required=False)
negate = forms.BooleanField(initial=False, required=False, label=_('Negate'))

def _build_field_choices(self, fields):
"""
Expand Down
139 changes: 139 additions & 0 deletions advanced_filters/locale/ja/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-11 18:34+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"

#: admin.py:24
msgid "Advanced filters"
msgstr "カスタムフィルター"

#: admin.py:76
msgid "Advanced filter added successfully."
msgstr "カスタムフィルターが追加されました。"

#: forms.py:51
msgid "Equals"
msgstr "等しい"

#: forms.py:52
msgid "Contains"
msgstr "含む(文字列)"

#: forms.py:53
msgid "One of"
msgstr "含む(複数の中の一つ)"

#: forms.py:54
msgid "DateTime Range"
msgstr "期間"

#: forms.py:55
msgid "Is NULL"
msgstr "空(NULL)"

#: forms.py:56
msgid "Is TRUE"
msgstr "真(TRUE)"

#: forms.py:57
msgid "Is FALSE"
msgstr "偽(FALSE)"

#: forms.py:58
msgid "Less Than"
msgstr "値より少ない"

#: forms.py:59
msgid "Greater Than"
msgstr "値より多い"

#: forms.py:60
msgid "Less Than or Equal To"
msgstr "値以下"

#: forms.py:61
msgid "Greater Than or Equal To"
msgstr "値以上"

#: forms.py:65
msgid "Or (mark an or between blocks)"
msgstr "OR(各条件をANDではなくORとして処理)"

#: models.py:18 templates/admin/advanced_filters.html:16
msgid "Advanced Filter"
msgstr "カスタムフィルター"

#: models.py:19
msgid "Advanced Filters"
msgstr "カスタムフィルター"

#: templates/admin/advanced_filters.html:16
msgid "Edit"
msgstr "修正"

#: templates/admin/advanced_filters.html:28
msgid "Create advanced filter"
msgstr "カスタムフィルターの作成"

#: templates/admin/advanced_filters.html:67
msgid "Save"
msgstr "保存"

#: templates/admin/advanced_filters.html:68
#: templates/admin/advanced_filters/change_form.html:53
msgid "Save & Filter Now!"
msgstr "保存してフィルターを適用"

#: templates/admin/advanced_filters.html:69
msgid "Cancel"
msgstr "キャンセル"

#: templates/admin/advanced_filters/change_form.html:16
msgid "Change advanced filter"
msgstr "カスタムフィルターを変更"

#: templates/admin/common_js_init.html:14
msgid "Add another filter"
msgstr "他のフィルターを追加"

#: templates/admin/common_js_init.html:15
msgid "Remove"
msgstr "削除"

#: models.py:21
msgid "Title"
msgstr "タイトル"

#: forms.py:76
msgid "Field"
msgstr "項目"

#: forms.py:77
msgid "Operator"
msgstr "比較"

#: forms.py:81
msgid "Value"
msgstr "値"

#: forms.py:86
msgid "Negate"
msgstr "否定"

12 changes: 6 additions & 6 deletions advanced_filters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class Meta:
verbose_name = _('Advanced Filter')
verbose_name_plural = _('Advanced Filters')

title = models.CharField(max_length=255, null=False, blank=False)
title = models.CharField(max_length=255, null=False, blank=False, verbose_name=_('Title'))
created_by = models.ForeignKey(settings.AUTH_USER_MODEL,
related_name='created_advanced_filters')
created_at = models.DateTimeField(auto_now_add=True, null=True)
url = models.CharField(max_length=255, null=False, blank=False)
users = models.ManyToManyField(settings.AUTH_USER_MODEL, blank=True)
groups = models.ManyToManyField('auth.Group', blank=True)
related_name='created_advanced_filters', verbose_name=_('Created by'))
created_at = models.DateTimeField(auto_now_add=True, null=True, verbose_name=_('Created at'))
url = models.CharField(max_length=255, null=False, blank=False, verbose_name=_('URL'))
users = models.ManyToManyField(settings.AUTH_USER_MODEL, blank=True, verbose_name=_('Users'))
groups = models.ManyToManyField('auth.Group', blank=True, verbose_name=_('Groups'))

objects = UserLookupManager()

Expand Down

0 comments on commit d7acb36

Please sign in to comment.