Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
a8b20f6e
Commit
a8b20f6e
authored
Nov 01, 2017
by
Jérome Perrin
Committed by
Rafael Monnerat
Nov 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bts: translation mapping should be utf-8 encoded strings
parent
00827d81
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
36 deletions
+32
-36
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.py
...unting/AccountingTransaction_createReversalTransaction.py
+4
-4
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.py
...rp5_accounting/Invoice_createRelatedPaymentTransaction.py
+3
-4
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.py
...w/accounting_workflow/scripts/validateTransactionLines.py
+5
-8
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_jumpToOrder.py
...teItem/portal_skins/erp5_invoicing/Invoice_jumpToOrder.py
+4
-4
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Order_jumpToInvoice.py
...teItem/portal_skins/erp5_invoicing/Order_jumpToInvoice.py
+4
-4
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransaction_jumpToPaymentTransactionGroup.py
..._mean/PaymentTransaction_jumpToPaymentTransactionGroup.py
+6
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.py
...teItem/portal_skins/erp5_core/Base_jumpToRelatedObject.py
+6
-6
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_createReversalTransaction.py
View file @
a8b20f6e
...
...
@@ -28,11 +28,11 @@ reversal = accounting_module.newContent (
destination_payment_request
=
context
.
getProperty
(
'destination_payment_request'
),
source_administration
=
context
.
getSourceAdministration
(),
destination_administration
=
context
.
getDestinationAdministration
(),
title
=
Base_translateString
(
"Reversal Transaction for ${title}"
,
mapping
=
{
'title'
:
unicode
(
context
.
getTitleOrId
(),
'utf8'
)}),
description
=
Base_translateString
(
title
=
Base_translateString
(
"Reversal Transaction for ${title}"
,
mapping
=
{
'title'
:
context
.
getTitleOrId
(
)}),
description
=
Base_translateString
(
"Reversal Transaction for ${title} (${specific_reference})"
,
mapping
=
{
'title'
:
unicode
(
context
.
getTitleOrId
(),
'utf8'
),
mapping
=
{
'title'
:
context
.
getTitleOrId
(
),
'specific_reference'
:
specific_reference
}),
resource
=
context
.
getResource
(),
specialise_list
=
context
.
getSpecialiseList
(),
...
...
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.py
View file @
a8b20f6e
...
...
@@ -42,10 +42,9 @@ if sum(total_payable_price_details.values()) == 0:
related_payment
=
portal
.
accounting_module
.
newContent
(
portal_type
=
transaction_portal_type
,
title
=
str
(
Base_translateString
(
"Payment of ${invoice_title}"
,
mapping
=
dict
(
invoice_title
=
unicode
((
context
.
getReference
()
or
context
.
getTitle
()
or
''
),
'utf8'
,
'repr'
)))),
title
=
Base_translateString
(
"Payment of ${invoice_title}"
,
mapping
=
dict
(
invoice_title
=
(
context
.
getReference
()
or
context
.
getTitle
()
or
''
))),
source_section
=
context
.
getSourceSection
(),
destination_section
=
context
.
getDestinationSection
(),
source_project
=
context
.
getSourceProject
(),
...
...
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/validateTransactionLines.py
View file @
a8b20f6e
...
...
@@ -34,22 +34,19 @@ for line in transaction_lines:
if
account
is
not
None
and
account
.
getValidationState
()
!=
'validated'
:
raise
ValidationFailed
,
translateString
(
"Account ${account_title} is not validated."
,
mapping
=
dict
(
account_title
=
unicode
(
account
.
Account_getFormattedTitle
(),
'utf8'
)))
mapping
=
dict
(
account_title
=
account
.
Account_getFormattedTitle
()))
if
third_party
is
not
None
and
\
third_party
.
getValidationState
()
in
invalid_state_list
:
raise
ValidationFailed
,
translateString
(
"Third party ${third_party_name} is invalid."
,
mapping
=
dict
(
third_party_name
=
unicode
(
third_party
.
getTitle
(),
'utf8'
)))
mapping
=
dict
(
third_party_name
=
third_party
.
getTitle
()))
if
bank_account
is
not
None
:
if
bank_account
.
getValidationState
()
in
invalid_state_list
:
raise
ValidationFailed
,
translateString
(
"Bank Account ${bank_account_reference} is invalid."
,
mapping
=
dict
(
bank_account_reference
=
unicode
(
bank_account
.
getReference
(),
'utf8'
)))
mapping
=
dict
(
bank_account_reference
=
bank_account
.
getReference
()))
if
account
is
not
None
and
account
.
isMemberOf
(
'account_type/asset/cash/bank'
):
# also check that currencies are consistent if we use this quantity for
...
...
@@ -60,8 +57,8 @@ for line in transaction_lines:
raise
ValidationFailed
,
translateString
(
"Bank Account ${bank_account_reference} "
"uses ${bank_account_currency} as default currency."
,
mapping
=
dict
(
bank_account_reference
=
unicode
(
bank_account
.
getReference
(),
'utf8'
),
bank_account_currency
=
unicode
(
bank_account
.
getPriceCurrencyReference
(),
'utf8'
)))
mapping
=
dict
(
bank_account_reference
=
bank_account
.
getReference
(
),
bank_account_currency
=
bank_account
.
getPriceCurrencyReference
(
)))
source_currency
=
None
source_section
=
line
.
getSourceSectionValue
()
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_jumpToOrder.py
View file @
a8b20f6e
...
...
@@ -17,10 +17,10 @@ if packing_list_list:
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}
))
return
related_order_list
[
0
].
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
))
else
:
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Order_jumpToInvoice.py
View file @
a8b20f6e
...
...
@@ -18,10 +18,10 @@ if packing_list_list:
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}
))
return
related_object
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
))
else
:
...
...
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransaction_jumpToPaymentTransactionGroup.py
View file @
a8b20f6e
...
...
@@ -13,13 +13,13 @@ for line in context.getMovementList(
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))))
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()}
))))
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
translateString
(
'No %s Related'
%
portal_type
,
default
=
unicode
(
translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
translateString
(
portal_type
)}),
'utf8'
))))
default
=
translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
translateString
(
portal_type
)}
))))
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedObject.py
View file @
a8b20f6e
...
...
@@ -42,8 +42,8 @@ if len(related_list) == 0:
url
=
context
.
absolute_url
()
message
=
Base_translateString
(
'No %s Related'
%
portal_type
[
0
],
default
=
unicode
(
Base_translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
Base_translateString
(
portal_type
[
0
])}),
'utf8'
))
default
=
Base_translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
Base_translateString
(
portal_type
[
0
])}
))
elif
len
(
related_list
)
==
1
:
relation_found
=
1
...
...
@@ -63,10 +63,10 @@ elif len(related_list) == 1:
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
default
=
unicode
(
Base_translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
)
)
default
=
Base_translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
)
else
:
url
=
context
.
absolute_url
()
message
=
Base_translateString
(
"You are not authorised to view the related document."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment