Commit dd71e11f authored by Xiaowu Zhang's avatar Xiaowu Zhang

*: increase taget language priority

for web site, default language's value is 80, current is 100
parent 229580d6
......@@ -86,7 +86,7 @@ if override_batch_mode:
letter_modification_date = DateTime("1976-11-04")
if letter_language and letter_language != blank:
letter.REQUEST['AcceptLanguage'].set(letter_language, 10)
letter.REQUEST['AcceptLanguage'].set(letter_language, 150)
else:
letter_language = blank
if letter_reference is None:
......
......@@ -101,7 +101,7 @@ if doc_language is None or doc_language == "":
doc_language = html_quote(override_document_language) if override_document_language else doc_language
if doc_language is not None:
doc.REQUEST['AcceptLanguage'].set(doc_language, 10)
doc.REQUEST['AcceptLanguage'].set(doc_language, 150)
else:
doc_language = blank
......
......@@ -97,7 +97,7 @@ if override_batch_mode:
book_short_date = book_modification_date.strftime('%Y-%m-%d')
if book_language:
book.REQUEST['AcceptLanguage'].set(book_language, 10)
book.REQUEST['AcceptLanguage'].set(book_language, 150)
else:
book_language = blank
......
......@@ -64,7 +64,7 @@ if override_batch_mode:
contract_short_date = contract_modification_date.strftime('%Y-%m-%d')
if contract_language:
context.REQUEST['AcceptLanguage'].set(contract_language, 10)
context.REQUEST['AcceptLanguage'].set(contract_language, 150)
else:
contract_language = blank
......
......@@ -68,7 +68,7 @@ if override_batch_mode:
leaflet_date="Nov-1976"
leaflet_year="1976"
if leaflet_language and leaflet_language != blank:
leaflet.REQUEST['AcceptLanguage'].set(leaflet_language, 10)
leaflet.REQUEST['AcceptLanguage'].set(leaflet_language, 150)
else:
leaflet_language = blank
if leaflet_reference is None:
......
......@@ -70,7 +70,7 @@ release_version = release.getVersion() or "001"
if override_batch_mode:
release_creation_year="1976"
if release_language is not None:
release.REQUEST['AcceptLanguage'].set(release_language, 10)
release.REQUEST['AcceptLanguage'].set(release_language, 150)
if release_language is None:
release_language = blank
if release_reference is None:
......
......@@ -254,7 +254,7 @@ if override_batch_mode:
doc_version = "001"
doc_creation_year = "1976"
if doc_language and doc_language != blank:
doc.REQUEST['AcceptLanguage'].set(doc_language, 10)
doc.REQUEST['AcceptLanguage'].set(doc_language, 150)
else:
doc_language = blank
if doc_reference is None:
......
# This script uses format= argument
# pylint: disable=redefined-builtin
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.Invoice_viewAsODT(format=format)
# this API uses format=
# pylint: disable=redefined-builtin
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.ProductionOrder_viewAsODT(format=format)
# this API uses format=
# pylint: disable=redefined-builtin
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.ProductionPackingList_viewAsODT(format=format)
......@@ -3,7 +3,7 @@ request = container.REQUEST
request.set('portal_skin', 'ODS') # Some TALES expressions checks this
if target_language:
request['AcceptLanguage'].set(target_language, 10)
request['AcceptLanguage'].set(target_language, 150)
if print_mode == 'list_view' or print_mode == 'list_view_separate_sheet':
if print_mode == 'list_view_separate_sheet':
......
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.PaySheetTransaction_viewAsODT(format=format)
......@@ -9,7 +9,7 @@ if use_ods_style:
request.set('reset', 1) # Some TALES expressions checks this
if target_language:
request['AcceptLanguage'].set(target_language, 10)
request['AcceptLanguage'].set(target_language, 150)
form_report = getattr(context, print_mode)
return form_report(**kw)
......@@ -6,7 +6,7 @@
# different lines
from erp5.component.module.Log import log
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
unit_title_dict = {}
total_quantity_dict = {}
......
# this API uses format=
# pylint:disable=redefined-builtin
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.Order_viewAsODT(format=format)
# this API uses format=
# pylint:disable=redefined-builtin
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
return context.PackingList_viewAsODT(format=format)
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
container.REQUEST.set('format', 'pdf')
return context.getPortalObject().web_page_module.newContent(
......
......@@ -4,7 +4,7 @@
context.Base_updateListboxSelection()
if target_language:
container.REQUEST['AcceptLanguage'].set(target_language, 10)
container.REQUEST['AcceptLanguage'].set(target_language, 150)
if print_mode == 'list_view':
return context.Folder_viewContentListReport()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment