Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
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
Hide 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 (
...
@@ -28,11 +28,11 @@ reversal = accounting_module.newContent (
destination_payment_request
=
context
.
getProperty
(
'destination_payment_request'
),
destination_payment_request
=
context
.
getProperty
(
'destination_payment_request'
),
source_administration
=
context
.
getSourceAdministration
(),
source_administration
=
context
.
getSourceAdministration
(),
destination_administration
=
context
.
getDestinationAdministration
(),
destination_administration
=
context
.
getDestinationAdministration
(),
title
=
Base_translateString
(
"Reversal Transaction for ${title}"
,
title
=
Base_translateString
(
"Reversal Transaction for ${title}"
,
mapping
=
{
'title'
:
unicode
(
context
.
getTitleOrId
(),
'utf8'
)}),
mapping
=
{
'title'
:
context
.
getTitleOrId
(
)}),
description
=
Base_translateString
(
description
=
Base_translateString
(
"Reversal Transaction for ${title} (${specific_reference})"
,
"Reversal Transaction for ${title} (${specific_reference})"
,
mapping
=
{
'title'
:
unicode
(
context
.
getTitleOrId
(),
'utf8'
),
mapping
=
{
'title'
:
context
.
getTitleOrId
(
),
'specific_reference'
:
specific_reference
}),
'specific_reference'
:
specific_reference
}),
resource
=
context
.
getResource
(),
resource
=
context
.
getResource
(),
specialise_list
=
context
.
getSpecialiseList
(),
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:
...
@@ -42,10 +42,9 @@ if sum(total_payable_price_details.values()) == 0:
related_payment
=
portal
.
accounting_module
.
newContent
(
related_payment
=
portal
.
accounting_module
.
newContent
(
portal_type
=
transaction_portal_type
,
portal_type
=
transaction_portal_type
,
title
=
str
(
Base_translateString
(
"Payment of ${invoice_title}"
,
title
=
Base_translateString
(
"Payment of ${invoice_title}"
,
mapping
=
dict
(
invoice_title
=
unicode
((
context
.
getReference
()
or
mapping
=
dict
(
invoice_title
=
(
context
.
getReference
()
or
context
.
getTitle
()
or
''
),
context
.
getTitle
()
or
''
))),
'utf8'
,
'repr'
)))),
source_section
=
context
.
getSourceSection
(),
source_section
=
context
.
getSourceSection
(),
destination_section
=
context
.
getDestinationSection
(),
destination_section
=
context
.
getDestinationSection
(),
source_project
=
context
.
getSourceProject
(),
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:
...
@@ -34,22 +34,19 @@ for line in transaction_lines:
if
account
is
not
None
and
account
.
getValidationState
()
!=
'validated'
:
if
account
is
not
None
and
account
.
getValidationState
()
!=
'validated'
:
raise
ValidationFailed
,
translateString
(
raise
ValidationFailed
,
translateString
(
"Account ${account_title} is not validated."
,
"Account ${account_title} is not validated."
,
mapping
=
dict
(
account_title
=
unicode
(
mapping
=
dict
(
account_title
=
account
.
Account_getFormattedTitle
()))
account
.
Account_getFormattedTitle
(),
'utf8'
)))
if
third_party
is
not
None
and
\
if
third_party
is
not
None
and
\
third_party
.
getValidationState
()
in
invalid_state_list
:
third_party
.
getValidationState
()
in
invalid_state_list
:
raise
ValidationFailed
,
translateString
(
raise
ValidationFailed
,
translateString
(
"Third party ${third_party_name} is invalid."
,
"Third party ${third_party_name} is invalid."
,
mapping
=
dict
(
third_party_name
=
unicode
(
mapping
=
dict
(
third_party_name
=
third_party
.
getTitle
()))
third_party
.
getTitle
(),
'utf8'
)))
if
bank_account
is
not
None
:
if
bank_account
is
not
None
:
if
bank_account
.
getValidationState
()
in
invalid_state_list
:
if
bank_account
.
getValidationState
()
in
invalid_state_list
:
raise
ValidationFailed
,
translateString
(
raise
ValidationFailed
,
translateString
(
"Bank Account ${bank_account_reference} is invalid."
,
"Bank Account ${bank_account_reference} is invalid."
,
mapping
=
dict
(
bank_account_reference
=
unicode
(
mapping
=
dict
(
bank_account_reference
=
bank_account
.
getReference
()))
bank_account
.
getReference
(),
'utf8'
)))
if
account
is
not
None
and
account
.
isMemberOf
(
'account_type/asset/cash/bank'
):
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
# also check that currencies are consistent if we use this quantity for
...
@@ -60,8 +57,8 @@ for line in transaction_lines:
...
@@ -60,8 +57,8 @@ for line in transaction_lines:
raise
ValidationFailed
,
translateString
(
raise
ValidationFailed
,
translateString
(
"Bank Account ${bank_account_reference} "
"Bank Account ${bank_account_reference} "
"uses ${bank_account_currency} as default currency."
,
"uses ${bank_account_currency} as default currency."
,
mapping
=
dict
(
bank_account_reference
=
unicode
(
bank_account
.
getReference
(),
'utf8'
),
mapping
=
dict
(
bank_account_reference
=
bank_account
.
getReference
(
),
bank_account_currency
=
unicode
(
bank_account
.
getPriceCurrencyReference
(),
'utf8'
)))
bank_account_currency
=
bank_account
.
getPriceCurrencyReference
(
)))
source_currency
=
None
source_currency
=
None
source_section
=
line
.
getSourceSectionValue
()
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:
...
@@ -17,10 +17,10 @@ if packing_list_list:
# first, try to get a full translated message with portal types
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))
"that_title"
:
context
.
getTitleOrId
()
}
))
return
related_order_list
[
0
].
Base_redirect
(
'view'
,
return
related_order_list
[
0
].
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
))
keep_items
=
dict
(
portal_status_message
=
message
))
else
:
else
:
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Order_jumpToInvoice.py
View file @
a8b20f6e
...
@@ -18,10 +18,10 @@ if packing_list_list:
...
@@ -18,10 +18,10 @@ if packing_list_list:
# first, try to get a full translated message with portal types
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))
"that_title"
:
context
.
getTitleOrId
()
}
))
return
related_object
.
Base_redirect
(
'view'
,
return
related_object
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
message
))
keep_items
=
dict
(
portal_status_message
=
message
))
else
:
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(
...
@@ -13,13 +13,13 @@ for line in context.getMovementList(
# first, try to get a full translated message with portal types
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
# if not found, fallback to generic translation
default
=
unicode
(
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
default
=
translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
))))
"that_title"
:
context
.
getTitleOrId
()}
))))
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
translateString
(
portal_status_message
=
translateString
(
'No %s Related'
%
portal_type
,
'No %s Related'
%
portal_type
,
default
=
unicode
(
translateString
(
'No ${portal_type} related.'
,
default
=
translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
translateString
(
portal_type
)}),
'utf8'
))))
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:
...
@@ -42,8 +42,8 @@ if len(related_list) == 0:
url
=
context
.
absolute_url
()
url
=
context
.
absolute_url
()
message
=
Base_translateString
(
message
=
Base_translateString
(
'No %s Related'
%
portal_type
[
0
],
'No %s Related'
%
portal_type
[
0
],
default
=
unicode
(
Base_translateString
(
'No ${portal_type} related.'
,
default
=
Base_translateString
(
'No ${portal_type} related.'
,
mapping
=
{
'portal_type'
:
Base_translateString
(
portal_type
[
0
])}),
'utf8'
))
mapping
=
{
'portal_type'
:
Base_translateString
(
portal_type
[
0
])}
))
elif
len
(
related_list
)
==
1
:
elif
len
(
related_list
)
==
1
:
relation_found
=
1
relation_found
=
1
...
@@ -63,10 +63,10 @@ elif len(related_list) == 1:
...
@@ -63,10 +63,10 @@ elif len(related_list) == 1:
# first, try to get a full translated message with portal types
# first, try to get a full translated message with portal types
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
"%s related to %s."
%
(
related_object
.
getPortalType
(),
context
.
getPortalType
()),
# if not found, fallback to generic translation
# if not found, fallback to generic translation
default
=
unicode
(
Base_translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
default
=
Base_translateString
(
'${this_portal_type} related to ${that_portal_type} : ${that_title}.'
,
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
mapping
=
{
"this_portal_type"
:
related_object
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_portal_type"
:
context
.
getTranslatedPortalType
(),
"that_title"
:
context
.
getTitleOrId
()
}),
'utf8'
)
)
"that_title"
:
context
.
getTitleOrId
()
}),
)
else
:
else
:
url
=
context
.
absolute_url
()
url
=
context
.
absolute_url
()
message
=
Base_translateString
(
"You are not authorised to view the related document."
)
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