Revised the error messages and their translations both in Python and for the JavaScript.
This commit is contained in:
		| @@ -49,7 +49,7 @@ class RecordForm(forms.Form): | ||||
|         required=False, | ||||
|         max_length=128, | ||||
|         error_messages={ | ||||
|             "max_length": _("This summary is too long."), | ||||
|             "max_length": _("This summary is too long (max. 128 characters)."), | ||||
|         }) | ||||
|     amount = forms.IntegerField( | ||||
|         min_value=1, | ||||
| @@ -181,13 +181,14 @@ class TransactionForm(forms.Form): | ||||
|     date = forms.DateField( | ||||
|         required=True, | ||||
|         error_messages={ | ||||
|             "required": _("Please fill in the date."), | ||||
|             "invalid": _("This date is not valid.") | ||||
|         }) | ||||
|     notes = forms.CharField( | ||||
|         required=False, | ||||
|         max_length=128, | ||||
|         error_messages={ | ||||
|             "max_length": _("This notes is too long.") | ||||
|             "max_length": _("These notes are too long (max. 128 characters).") | ||||
|         }) | ||||
|  | ||||
|     def __init__(self, *args, **kwargs): | ||||
|   | ||||
| @@ -5,16 +5,17 @@ | ||||
| # | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: mia 1.0\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2020-08-06 00:48+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 00:40+0800\n" | ||||
| "Project-Id-Version: mia-js 1.0\n" | ||||
| "Report-Msgid-Bugs-To: imacat <imacat@mail.imacat.idv.tw>\n" | ||||
| "POT-Creation-Date: 2020-08-06 01:42+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 01:46+0800\n" | ||||
| "Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language: Traditional Chinese\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| "Plural-Forms: nplurals=1; plural=0;\n" | ||||
|  | ||||
| #: accounting/converters.py:127 accounting/utils.py:261 | ||||
| msgid "current assets and liabilities" | ||||
| @@ -29,8 +30,8 @@ msgid "Please select the account." | ||||
| msgstr "請選擇會計科目。" | ||||
|  | ||||
| #: accounting/forms.py:52 | ||||
| msgid "This summary is too long." | ||||
| msgstr "摘要太長了。" | ||||
| msgid "This summary is too long (max. 128 characters)." | ||||
| msgstr "摘要太長了(最長128個字)。" | ||||
|  | ||||
| #: accounting/forms.py:57 | ||||
| msgid "Please fill in the amount." | ||||
| @@ -65,14 +66,18 @@ msgid "This record is not a debit record." | ||||
| msgstr "這不是借方的會計記錄。" | ||||
|  | ||||
| #: accounting/forms.py:184 | ||||
| msgid "Please fill in the date." | ||||
| msgstr "請填寫日期。" | ||||
|  | ||||
| #: accounting/forms.py:185 | ||||
| msgid "This date is not valid." | ||||
| msgstr "請依正確日期格式填寫日期。" | ||||
|  | ||||
| #: accounting/forms.py:190 | ||||
| msgid "This notes is too long." | ||||
| msgstr "註記太長了。" | ||||
| #: accounting/forms.py:191 | ||||
| msgid "These notes are too long (max. 128 characters)." | ||||
| msgstr "註記太長了(最長128個字)。" | ||||
|  | ||||
| #: accounting/forms.py:220 | ||||
| #: accounting/forms.py:221 | ||||
| msgid "The total amount of debit and credit records are inconsistent." | ||||
| msgstr "借方和貸方合計不符。" | ||||
|  | ||||
|   | ||||
| @@ -1,18 +1,17 @@ | ||||
| # 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. | ||||
| # Traditional Chinese PO file for the JavaScript on the Mia Website | ||||
| # Copyright (C) 2020 imacat | ||||
| # This file is distributed under the same license as the Mia package. | ||||
| # imacat <imacat@mail.imacat.idv.tw>, 2020. | ||||
| # | ||||
| #, fuzzy | ||||
| msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: PACKAGE VERSION\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2020-08-06 01:34+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 01:38+0800\n" | ||||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
| "Language-Team: LANGUAGE <LL@li.org>\n" | ||||
| "Language: \n" | ||||
| "Project-Id-Version: mia 1.0\n" | ||||
| "Report-Msgid-Bugs-To: imacat <imacat@mail.imacat.idv.tw>\n" | ||||
| "POT-Creation-Date: 2020-08-06 01:42+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 01:46+0800\n" | ||||
| "Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language: Traditional Chinese\n" | ||||
| "MIME-Version: 1.0\n" | ||||
| "Content-Type: text/plain; charset=UTF-8\n" | ||||
| "Content-Transfer-Encoding: 8bit\n" | ||||
| @@ -20,7 +19,7 @@ msgstr "" | ||||
|  | ||||
| #: accounting/static/accounting/js/transaction-form.js:369 | ||||
| msgid "Please fill in the date." | ||||
| msgstr "請填上日期。" | ||||
| msgstr "請填寫日期。" | ||||
|  | ||||
| #: accounting/static/accounting/js/transaction-form.js:389 | ||||
| msgid "Please select the account." | ||||
| @@ -32,12 +31,12 @@ msgstr "摘要太長了(最長128個字)。" | ||||
|  | ||||
| #: accounting/static/accounting/js/transaction-form.js:431 | ||||
| msgid "Please fill in the amount." | ||||
| msgstr "請填上金額。" | ||||
| msgstr "請填寫金額。" | ||||
|  | ||||
| #: accounting/static/accounting/js/transaction-form.js:463 | ||||
| msgid "The total amount of debit and credit records are inconsistent." | ||||
| msgstr "借方和貸方合計不符。" | ||||
|  | ||||
| #: accounting/static/accounting/js/transaction-form.js:484 | ||||
| msgid "This note is too long (max. 128 characters)." | ||||
| msgid "These notes are too long (max. 128 characters)." | ||||
| msgstr "註記太長了(最長128個字)。" | ||||
|   | ||||
| @@ -481,7 +481,7 @@ function validateNote() { | ||||
|     note.value = note.value.trim(); | ||||
|     if (note.value.length > 128) { | ||||
|         note.classList.add("is-invalid"); | ||||
|         errorMessage.text(gettext("This note is too long (max. 128 characters).")); | ||||
|         errorMessage.text(gettext("These notes are too long (max. 128 characters).")); | ||||
|         return false; | ||||
|     } | ||||
|     note.classList.remove("is-invalid"); | ||||
|   | ||||
| @@ -7,8 +7,8 @@ msgid "" | ||||
| msgstr "" | ||||
| "Project-Id-Version: mia 1.0\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2020-08-06 00:48+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 00:40+0800\n" | ||||
| "POT-Creation-Date: 2020-08-06 01:42+0800\n" | ||||
| "PO-Revision-Date: 2020-08-06 01:46+0800\n" | ||||
| "Last-Translator: imacat <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language-Team: Traditional Chinese <imacat@mail.imacat.idv.tw>\n" | ||||
| "Language: Traditional Chinese\n" | ||||
| @@ -37,11 +37,11 @@ msgid "All Time" | ||||
| msgstr "全部" | ||||
|  | ||||
| #: mia_core/period.py:583 mia_core/period.py:616 | ||||
| #: mia_core/templatetags/mia_core.py:212 | ||||
| #: mia_core/templatetags/mia_core.py:213 | ||||
| msgid "This Month" | ||||
| msgstr "這個月" | ||||
|  | ||||
| #: mia_core/period.py:624 mia_core/templatetags/mia_core.py:219 | ||||
| #: mia_core/period.py:624 mia_core/templatetags/mia_core.py:220 | ||||
| msgid "Last Month" | ||||
| msgstr "上個月" | ||||
|  | ||||
| @@ -53,11 +53,11 @@ msgstr "今年" | ||||
| msgid "Last Year" | ||||
| msgstr "去年" | ||||
|  | ||||
| #: mia_core/period.py:656 mia_core/templatetags/mia_core.py:192 | ||||
| #: mia_core/period.py:656 mia_core/templatetags/mia_core.py:193 | ||||
| msgid "Today" | ||||
| msgstr "今天" | ||||
|  | ||||
| #: mia_core/period.py:658 mia_core/templatetags/mia_core.py:194 | ||||
| #: mia_core/period.py:658 mia_core/templatetags/mia_core.py:195 | ||||
| msgid "Yesterday" | ||||
| msgstr "昨天" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user