[REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().
task-3292454
closes odoo/odoo#130179
Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { listView } from "@web/views/list/list_view";
|
||||
@@ -80,7 +80,7 @@ export const accountFileUploader = {
|
||||
extractProps: ({ attrs }) => ({
|
||||
togglerTemplate: attrs.template || "account.JournalUploadLink",
|
||||
btnClass: attrs.btnClass || "",
|
||||
linkText: attrs.linkText || attrs.title || _lt("Upload"), //TODO: remove linkText attr in master (not translatable)
|
||||
linkText: attrs.linkText || attrs.title || _t("Upload"), //TODO: remove linkText attr in master (not translatable)
|
||||
}),
|
||||
fieldDependencies: [
|
||||
{ name: "id", type: "integer" },
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ import { usePosition } from "@web/core/position_hook";
|
||||
import { getActiveHotkey } from "@web/core/hotkeys/hotkey_service";
|
||||
import { shallowEqual } from "@web/core/utils/arrays";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { AutoComplete } from "@web/core/autocomplete/autocomplete";
|
||||
import { useRecordObserver } from "@web/model/relational_model/utils";
|
||||
|
||||
@@ -22,12 +22,12 @@ import { SelectCreateDialog } from "@web/views/view_dialogs/select_create_dialog
|
||||
const { Component, useState, useRef, useExternalListener, onWillStart, onPatched } = owl;
|
||||
|
||||
const PLAN_APPLICABILITY = {
|
||||
mandatory: _lt("Mandatory"),
|
||||
optional: _lt("Optional"),
|
||||
mandatory: _t("Mandatory"),
|
||||
optional: _t("Optional"),
|
||||
}
|
||||
const PLAN_STATUS = {
|
||||
invalid: _lt("Invalid"),
|
||||
ok: _lt("OK"),
|
||||
invalid: _t("Invalid"),
|
||||
ok: _t("OK"),
|
||||
}
|
||||
export class AnalyticDistribution extends Component {
|
||||
setup(){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { standardFieldProps } from "@web/views/fields/standard_field_props";
|
||||
@@ -36,7 +36,7 @@ PasswordField.template = "auth_password_policy.PasswordField";
|
||||
|
||||
export const passwordField = {
|
||||
component: PasswordField,
|
||||
displayName: _lt("Password"),
|
||||
displayName: _t("Password"),
|
||||
supportedTypes: ["char"],
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { BarcodeParser } from "@barcodes/js/barcode_parser";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
export class GS1BarcodeError extends Error {};
|
||||
|
||||
export const FNC1_CHAR = String.fromCharCode(29);
|
||||
@@ -81,14 +81,14 @@ patch(BarcodeParser.prototype, "barcodes_gs1_nomenclature.BarcodeParser", {
|
||||
}
|
||||
} else if (rule.gs1_content_type === 'identifier'){
|
||||
if (parseInt(match[2][match[2].length - 1]) !== this.get_barcode_check_digit("0".repeat(18 - match[2].length) + match[2])){
|
||||
throw new Error(_lt("Invalid barcode: the check digit is incorrect"));
|
||||
// return {error: _lt("Invalid barcode: the check digit is incorrect")};
|
||||
throw new Error(_t("Invalid barcode: the check digit is incorrect"));
|
||||
// return {error: _t("Invalid barcode: the check digit is incorrect")};
|
||||
}
|
||||
result.value = match[2];
|
||||
} else if (rule.gs1_content_type === 'date'){
|
||||
if (match[2].length !== 6){
|
||||
throw new Error(_lt("Invalid barcode: can't be formated as date"));
|
||||
// return {error: _lt("Invalid barcode: can't be formated as date")};
|
||||
throw new Error(_t("Invalid barcode: can't be formated as date"));
|
||||
// return {error: _t("Invalid barcode: can't be formated as date")};
|
||||
}
|
||||
result.value = this.gs1_date_to_date(match[2]);
|
||||
} else {
|
||||
@@ -121,12 +121,12 @@ patch(BarcodeParser.prototype, "barcodes_gs1_nomenclature.BarcodeParser", {
|
||||
return results; // Barcode completly parsed, no need to keep looping.
|
||||
}
|
||||
} else {
|
||||
throw new GS1BarcodeError(_lt("This barcode can't be parsed by any barcode rules."));
|
||||
throw new GS1BarcodeError(_t("This barcode can't be parsed by any barcode rules."));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (barcodeLength === barcode.length) {
|
||||
throw new GS1BarcodeError(_lt("This barcode can't be partially or fully parsed."));
|
||||
throw new GS1BarcodeError(_t("This barcode can't be partially or fully parsed."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { BoardController } from "./board_controller";
|
||||
import { XMLParser } from "@web/core/utils/xml";
|
||||
@@ -60,7 +60,7 @@ export class BoardArchParser extends XMLParser {
|
||||
|
||||
export const boardView = {
|
||||
type: "form",
|
||||
display_name: _lt("Board"),
|
||||
display_name: _t("Board"),
|
||||
Controller: BoardController,
|
||||
|
||||
props: (genericProps, view) => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
registry.category("discuss.channel_commands").add("lead", {
|
||||
help: _lt("Create a new lead (/lead lead title)"),
|
||||
help: _t("Create a new lead (/lead lead title)"),
|
||||
methodName: "execute_command_lead",
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "@web/views/fields/standard_field_props";
|
||||
|
||||
const { Component } = owl;
|
||||
@@ -25,7 +25,7 @@ IconSelectionField.props = {
|
||||
|
||||
export const iconSelectionField = {
|
||||
component: IconSelectionField,
|
||||
displayName: _lt("Icon Selection"),
|
||||
displayName: _t("Icon Selection"),
|
||||
supportedTypes: ["char", "text", "selection"],
|
||||
extractProps: ({ options }) => ({
|
||||
icons: options,
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
/* @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const commandRegistry = registry.category("discuss.channel_commands");
|
||||
|
||||
commandRegistry
|
||||
.add("help", {
|
||||
help: _lt("Show a helper message"),
|
||||
help: _t("Show a helper message"),
|
||||
methodName: "execute_command_help",
|
||||
})
|
||||
.add("leave", {
|
||||
help: _lt("Leave this channel"),
|
||||
help: _t("Leave this channel"),
|
||||
methodName: "execute_command_leave",
|
||||
})
|
||||
.add("who", {
|
||||
channel_types: ["channel", "chat", "group"],
|
||||
help: _lt("List users in the current channel"),
|
||||
help: _t("List users in the current channel"),
|
||||
methodName: "execute_command_who",
|
||||
});
|
||||
|
||||
@@ -4,7 +4,7 @@ import { cleanTerm } from "@mail/utils/common/format";
|
||||
|
||||
import { Component, xml } from "@odoo/owl";
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const commandSetupRegistry = registry.category("command_setup");
|
||||
@@ -15,9 +15,9 @@ const commandProviderRegistry = registry.category("command_provider");
|
||||
// -----------------------------------------------------------------------------
|
||||
commandSetupRegistry.add("@", {
|
||||
debounceDelay: 200,
|
||||
emptyMessage: _lt("No user found"),
|
||||
name: _lt("users"),
|
||||
placeholder: _lt("Search for a user..."),
|
||||
emptyMessage: _t("No user found"),
|
||||
name: _t("users"),
|
||||
placeholder: _t("Search for a user..."),
|
||||
});
|
||||
|
||||
class DialogCommand extends Component {}
|
||||
@@ -58,9 +58,9 @@ commandProviderRegistry.add("mail.partner", {
|
||||
|
||||
commandSetupRegistry.add("#", {
|
||||
debounceDelay: 200,
|
||||
emptyMessage: _lt("No channel found"),
|
||||
name: _lt("channels"),
|
||||
placeholder: _lt("Search for a channel..."),
|
||||
emptyMessage: _t("No channel found"),
|
||||
name: _t("channels"),
|
||||
placeholder: _t("Search for a channel..."),
|
||||
});
|
||||
|
||||
commandProviderRegistry.add("discuss.channel", {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { formatDuration } from "@web/views/fields/formatters";
|
||||
import {
|
||||
@@ -44,7 +44,7 @@ export class StatusBarDurationField extends StatusBarField {
|
||||
export const statusBarDurationField = {
|
||||
...statusBarField,
|
||||
component: StatusBarDurationField,
|
||||
displayName: _lt("Status with time"),
|
||||
displayName: _t("Status with time"),
|
||||
supportedTypes: ["many2one"],
|
||||
fieldDependencies: [{ name: "duration_tracking", type: "JSON" }],
|
||||
};
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
import { useOpenChat } from "@mail/core/web/open_chat_hook";
|
||||
import { useAssignUserCommand } from "@mail/views/web/fields/assign_user_command_hook";
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import {
|
||||
@@ -108,7 +108,7 @@ export const kanbanMany2OneAvatarUserField = {
|
||||
supportedOptions: [
|
||||
...(kanbanMany2OneAvatarField.supportedOptions || []),
|
||||
{
|
||||
label: _lt("Display avatar name"),
|
||||
label: _t("Display avatar name"),
|
||||
name: "display_avatar_name",
|
||||
type: "boolean",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "@web/views/fields/standard_field_props";
|
||||
import { initializeDesignTabCss } from "@mass_mailing/js/mass_mailing_design_constants";
|
||||
import { toInline, getCSSRules } from "@web_editor/js/backend/convert_inline";
|
||||
@@ -634,9 +634,9 @@ export class MassMailingHtmlField extends HtmlField {
|
||||
export const massMailingHtmlField = {
|
||||
...htmlField,
|
||||
component: MassMailingHtmlField,
|
||||
displayName: _lt("Email"),
|
||||
displayName: _t("Email"),
|
||||
supportedOptions: [...htmlField.supportedOptions, {
|
||||
label: _lt("Filter templates"),
|
||||
label: _t("Filter templates"),
|
||||
name: "filterTemplates",
|
||||
type: "boolean"
|
||||
}],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {_lt} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import snippetsEditor from "@web_editor/js/editor/snippets.editor";
|
||||
|
||||
export const MassMailingSnippetsMenu = snippetsEditor.SnippetsMenu.extend({
|
||||
@@ -17,7 +17,7 @@ export const MassMailingSnippetsMenu = snippetsEditor.SnippetsMenu.extend({
|
||||
DESIGN: 'design',
|
||||
}),
|
||||
optionsTabStructure: [
|
||||
['design-options', _lt("Design Options")],
|
||||
['design-options', _t("Design Options")],
|
||||
],
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { CharField, charField } from "@web/views/fields/char/char_field";
|
||||
@@ -56,7 +56,7 @@ SlidesViewer.template = "mrp.SlidesViewer";
|
||||
export const slidesViewer = {
|
||||
...charField,
|
||||
component: SlidesViewer,
|
||||
displayName: _lt("Google Slides Viewer"),
|
||||
displayName: _t("Google Slides Viewer"),
|
||||
};
|
||||
|
||||
registry.category("fields").add("embed_viewer", slidesViewer);
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class ErrorBarcodePopup extends ErrorPopup {
|
||||
static template = "point_of_sale.ErrorBarcodePopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelText: _lt("Cancel"),
|
||||
title: _lt("Error"),
|
||||
confirmText: _t("Ok"),
|
||||
cancelText: _t("Cancel"),
|
||||
title: _t("Error"),
|
||||
body: "",
|
||||
message: _lt(
|
||||
message: _t(
|
||||
"The Point of Sale could not find any product, customer, employee or action associated with the scanned barcode."
|
||||
),
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class OrderImportPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.OrderImportPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
confirmText: _t("Ok"),
|
||||
cancelKey: false,
|
||||
body: "",
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { onMounted } from "@odoo/owl";
|
||||
|
||||
@@ -9,8 +9,8 @@ import { onMounted } from "@odoo/owl";
|
||||
export class ErrorPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.ErrorPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
title: _lt("Error"),
|
||||
confirmText: _t("Ok"),
|
||||
title: _t("Error"),
|
||||
body: "",
|
||||
cancelKey: false,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { serializeDateTime } from "@web/core/l10n/dates";
|
||||
const { DateTime } = luxon;
|
||||
@@ -10,13 +10,13 @@ const { DateTime } = luxon;
|
||||
export class ErrorTracebackPopup extends ErrorPopup {
|
||||
static template = "point_of_sale.ErrorTracebackPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelText: _lt("Cancel"),
|
||||
confirmText: _t("Ok"),
|
||||
cancelText: _t("Cancel"),
|
||||
confirmKey: false,
|
||||
title: _lt("Error with Traceback"),
|
||||
title: _t("Error with Traceback"),
|
||||
body: "",
|
||||
exitButtonIsShown: false,
|
||||
exitButtonText: _lt("Exit Pos"),
|
||||
exitButtonText: _t("Exit Pos"),
|
||||
};
|
||||
|
||||
setup() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { usePos } from "@point_of_sale/app/store/pos_hook";
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
/**
|
||||
* This is a special kind of error popup as it introduces
|
||||
@@ -12,9 +12,9 @@ export class OfflineErrorPopup extends ErrorPopup {
|
||||
static template = "point_of_sale.OfflineErrorPopup";
|
||||
static dontShow = false;
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Continue with limited functionalities"),
|
||||
title: _lt("You're offline"),
|
||||
body: _lt(
|
||||
confirmText: _t("Continue with limited functionalities"),
|
||||
title: _t("You're offline"),
|
||||
body: _t(
|
||||
"Meanwhile connection is back, Odoo Point of Sale will operate limited operations. Check your connection or continue with limited functionalities"
|
||||
),
|
||||
};
|
||||
|
||||
+2
-2
@@ -1,12 +1,12 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class ControlButtonPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.ControlButtonPopup";
|
||||
static defaultProps = {
|
||||
cancelText: _lt("Back"),
|
||||
cancelText: _t("Back"),
|
||||
controlButtons: [],
|
||||
confirmKey: false,
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { useBarcodeReader } from "@point_of_sale/app/barcode/barcode_reader_hook";
|
||||
import { parseFloat } from "@web/views/fields/parsers";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { NumberPopup } from "@point_of_sale/app/utils/input_popups/number_popup";
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
@@ -29,7 +29,7 @@ export class ProductScreen extends ControlButtonsMixin(Component) {
|
||||
OrderWidget,
|
||||
ProductsWidget,
|
||||
};
|
||||
static numpadActionName = _lt("Payment");
|
||||
static numpadActionName = _t("Payment");
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { deserializeDateTime, deserializeDate } from "@web/core/l10n/dates";
|
||||
import { parseFloat } from "@web/views/fields/parsers";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { ErrorPopup } from "@point_of_sale/app/errors/popups/error_popup";
|
||||
import { ConfirmPopup } from "@point_of_sale/app/utils/confirm_popup/confirm_popup";
|
||||
@@ -42,8 +42,8 @@ export class TicketScreen extends Component {
|
||||
reuseSavedUIState: false,
|
||||
ui: {},
|
||||
};
|
||||
static numpadActionName = _lt("Refund");
|
||||
static searchPlaceholder = _lt("Search Orders...");
|
||||
static numpadActionName = _t("Refund");
|
||||
static searchPlaceholder = _t("Search Orders...");
|
||||
|
||||
setup() {
|
||||
this.pos = usePos();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { useAutoFocusToLast } from "@point_of_sale/app/utils/hooks";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useState } from "@odoo/owl";
|
||||
import { EditListInput } from "@point_of_sale/app/store/select_lot_popup/edit_list_input/edit_list_input";
|
||||
|
||||
@@ -42,8 +42,8 @@ export class EditListPopup extends AbstractAwaitablePopup {
|
||||
static components = { EditListInput };
|
||||
static template = "point_of_sale.EditListPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Add"),
|
||||
cancelText: _lt("Discard"),
|
||||
confirmText: _t("Add"),
|
||||
cancelText: _t("Discard"),
|
||||
array: [],
|
||||
isSingleItem: false,
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class AlertPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.AlertPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
confirmText: _t("Ok"),
|
||||
title: "",
|
||||
body: "",
|
||||
cancelKey: false,
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class ConfirmPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.ConfirmPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
cancelText: _lt("Cancel"),
|
||||
title: _lt("Confirm?"),
|
||||
confirmText: _t("Ok"),
|
||||
cancelText: _t("Cancel"),
|
||||
title: _t("Confirm?"),
|
||||
body: "",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { onMounted, useRef, useState } from "@odoo/owl";
|
||||
|
||||
export class DatePickerPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.DatePickerPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Confirm"),
|
||||
cancelText: _lt("Discard"),
|
||||
title: _lt("DatePicker"),
|
||||
confirmText: _t("Confirm"),
|
||||
cancelText: _t("Discard"),
|
||||
title: _t("DatePicker"),
|
||||
};
|
||||
|
||||
setup() {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useState } from "@odoo/owl";
|
||||
|
||||
export class SelectionPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.SelectionPopup";
|
||||
static defaultProps = {
|
||||
cancelText: _lt("Cancel"),
|
||||
title: _lt("Select"),
|
||||
cancelText: _t("Cancel"),
|
||||
title: _t("Select"),
|
||||
body: "",
|
||||
list: [],
|
||||
confirmKey: false,
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { onMounted, useRef, useState } from "@odoo/owl";
|
||||
|
||||
// formerly TextInputPopupWidget
|
||||
export class TextInputPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.TextInputPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Confirm"),
|
||||
cancelText: _lt("Discard"),
|
||||
confirmText: _t("Confirm"),
|
||||
cancelText: _t("Discard"),
|
||||
confirmKey: "Enter",
|
||||
title: "",
|
||||
body: "",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { onMounted, useRef, useState } from "@odoo/owl";
|
||||
|
||||
// IMPROVEMENT: This code is very similar to TextInputPopup.
|
||||
@@ -9,8 +9,8 @@ import { onMounted, useRef, useState } from "@odoo/owl";
|
||||
export class TextAreaPopup extends AbstractAwaitablePopup {
|
||||
static template = "point_of_sale.TextAreaPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Add"),
|
||||
cancelText: _lt("Discard"),
|
||||
confirmText: _t("Add"),
|
||||
cancelText: _t("Discard"),
|
||||
title: "",
|
||||
body: "",
|
||||
};
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { AbstractAwaitablePopup } from "@point_of_sale/app/popup/abstract_awaitable_popup";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useState } from "@odoo/owl";
|
||||
|
||||
export class PaymentTransactionPopup extends AbstractAwaitablePopup {
|
||||
static template = "pos_mercury.PaymentTransactionPopup";
|
||||
static defaultProps = {
|
||||
confirmText: _lt("Ok"),
|
||||
title: _lt("Online Payment"),
|
||||
confirmText: _t("Ok"),
|
||||
title: _t("Online Payment"),
|
||||
body: "",
|
||||
cancelKey: false,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { GraphArchParser } from "@web/views/graph/graph_arch_parser";
|
||||
import { graphView } from "@web/views/graph/graph_view";
|
||||
@@ -8,9 +8,9 @@ import { graphView } from "@web/views/graph/graph_view";
|
||||
const viewRegistry = registry.category("views");
|
||||
|
||||
const MEASURE_STRINGS = {
|
||||
parent_res_id: _lt("Project"),
|
||||
rating: _lt("Rating Value (/5)"),
|
||||
res_id: _lt("Task"),
|
||||
parent_res_id: _t("Project"),
|
||||
rating: _t("Rating Value (/5)"),
|
||||
res_id: _t("Task"),
|
||||
};
|
||||
|
||||
class ProjectRatingArchParser extends GraphArchParser {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { PivotArchParser } from "@web/views/pivot/pivot_arch_parser";
|
||||
import { pivotView } from "@web/views/pivot/pivot_view";
|
||||
@@ -8,9 +8,9 @@ import { pivotView } from "@web/views/pivot/pivot_view";
|
||||
const viewRegistry = registry.category("views");
|
||||
|
||||
const MEASURE_STRINGS = {
|
||||
parent_res_id: _lt("Project"),
|
||||
rating: _lt("Rating Value (/5)"),
|
||||
res_id: _lt("Task"),
|
||||
parent_res_id: _t("Project"),
|
||||
rating: _t("Rating Value (/5)"),
|
||||
res_id: _t("Task"),
|
||||
};
|
||||
|
||||
class ProjectRatingArchParser extends PivotArchParser {
|
||||
|
||||
+39
-39
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { renderToMarkup } from '@web/core/utils/render';
|
||||
|
||||
@@ -11,101 +11,101 @@ const star = markup(`<a style="color: gold;" class="fa fa-star"></a>`);
|
||||
const clock = markup(`<a class="fa fa-clock-o"></a>`);
|
||||
|
||||
const exampleData = {
|
||||
ghostColumns: [_lt('New'), _lt('Assigned'), _lt('In Progress'), _lt('Done')],
|
||||
applyExamplesText: _lt("Use This For My Project"),
|
||||
ghostColumns: [_t('New'), _t('Assigned'), _t('In Progress'), _t('Done')],
|
||||
applyExamplesText: _t("Use This For My Project"),
|
||||
allowedGroupBys: ['stage_id'],
|
||||
foldField: "fold",
|
||||
examples:[{
|
||||
name: _lt('Software Development'),
|
||||
columns: [_lt('Backlog'), _lt('Specifications'), _lt('Development'), _lt('Tests')],
|
||||
foldedColumns: [_lt('Delivered')],
|
||||
name: _t('Software Development'),
|
||||
columns: [_t('Backlog'), _t('Specifications'), _t('Development'), _t('Tests')],
|
||||
foldedColumns: [_t('Delivered')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.generic");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet, star],
|
||||
}, {
|
||||
name: _lt('Agile Scrum'),
|
||||
columns: [_lt('Backlog'), _lt('Sprint Backlog'), _lt('Sprint in Progress')],
|
||||
foldedColumns: [_lt('Sprint Complete'), _lt('Old Completed Sprint')],
|
||||
name: _t('Agile Scrum'),
|
||||
columns: [_t('Backlog'), _t('Sprint Backlog'), _t('Sprint in Progress')],
|
||||
foldedColumns: [_t('Sprint Complete'), _t('Old Completed Sprint')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.agilescrum");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet],
|
||||
}, {
|
||||
name: _lt('Digital Marketing'),
|
||||
columns: [_lt('Ideas'), _lt('Researching'), _lt('Writing'), _lt('Editing')],
|
||||
foldedColumns: [_lt('Done')],
|
||||
name: _t('Digital Marketing'),
|
||||
columns: [_t('Ideas'), _t('Researching'), _t('Writing'), _t('Editing')],
|
||||
foldedColumns: [_t('Done')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.digitalmarketing");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet],
|
||||
}, {
|
||||
name: _lt('Customer Feedback'),
|
||||
columns: [_lt('New'), _lt('In development')],
|
||||
foldedColumns: [_lt('Done'), _lt('Refused')],
|
||||
name: _t('Customer Feedback'),
|
||||
columns: [_t('New'), _t('In development')],
|
||||
foldedColumns: [_t('Done'), _t('Refused')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.customerfeedback");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet],
|
||||
}, {
|
||||
name: _lt('Consulting'),
|
||||
columns: [_lt('New Projects'), _lt('Resources Allocation'), _lt('In Progress')],
|
||||
foldedColumns: [_lt('Done')],
|
||||
name: _t('Consulting'),
|
||||
columns: [_t('New Projects'), _t('Resources Allocation'), _t('In Progress')],
|
||||
foldedColumns: [_t('Done')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.consulting");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet],
|
||||
}, {
|
||||
name: _lt('Research Project'),
|
||||
columns: [_lt('Brainstorm'), _lt('Research'), _lt('Draft')],
|
||||
foldedColumns: [_lt('Final Document')],
|
||||
name: _t('Research Project'),
|
||||
columns: [_t('Brainstorm'), _t('Research'), _t('Draft')],
|
||||
foldedColumns: [_t('Final Document')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.researchproject");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet],
|
||||
}, {
|
||||
name: _lt('Website Redesign'),
|
||||
columns: [_lt('Page Ideas'), _lt('Copywriting'), _lt('Design')],
|
||||
foldedColumns: [_lt('Live')],
|
||||
name: _t('Website Redesign'),
|
||||
columns: [_t('Page Ideas'), _t('Copywriting'), _t('Design')],
|
||||
foldedColumns: [_t('Live')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.researchproject");
|
||||
},
|
||||
}, {
|
||||
name: _lt('T-shirt Printing'),
|
||||
columns: [_lt('New Orders'), _lt('Logo Design'), _lt('To Print')],
|
||||
foldedColumns: [_lt('Done')],
|
||||
name: _t('T-shirt Printing'),
|
||||
columns: [_t('New Orders'), _t('Logo Design'), _t('To Print')],
|
||||
foldedColumns: [_t('Done')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.tshirtprinting");
|
||||
},
|
||||
bullets: [star],
|
||||
}, {
|
||||
name: _lt('Design'),
|
||||
columns: [_lt('New Request'), _lt('Design'), _lt('Client Review')],
|
||||
foldedColumns: [_lt('Handoff')],
|
||||
name: _t('Design'),
|
||||
columns: [_t('New Request'), _t('Design'), _t('Client Review')],
|
||||
foldedColumns: [_t('Handoff')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.generic");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet, star, clock],
|
||||
}, {
|
||||
name: _lt('Publishing'),
|
||||
columns: [_lt('Ideas'), _lt('Writing'), _lt('Editing')],
|
||||
foldedColumns: [_lt('Published')],
|
||||
name: _t('Publishing'),
|
||||
columns: [_t('Ideas'), _t('Writing'), _t('Editing')],
|
||||
foldedColumns: [_t('Published')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.generic");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet, star, clock],
|
||||
}, {
|
||||
name: _lt('Manufacturing'),
|
||||
columns: [_lt('New Orders'), _lt('Material Sourcing'), _lt('Manufacturing'), _lt('Assembling')],
|
||||
foldedColumns: [_lt('Delivered')],
|
||||
name: _t('Manufacturing'),
|
||||
columns: [_t('New Orders'), _t('Material Sourcing'), _t('Manufacturing'), _t('Assembling')],
|
||||
foldedColumns: [_t('Delivered')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.generic");
|
||||
},
|
||||
bullets: [greenBullet, orangeBullet, star, clock],
|
||||
}, {
|
||||
name: _lt('Podcast and Video Production'),
|
||||
columns: [_lt('Research'), _lt('Script'), _lt('Recording'), _lt('Mixing')],
|
||||
foldedColumns: [_lt('Published')],
|
||||
name: _t('Podcast and Video Production'),
|
||||
columns: [_t('Research'), _t('Script'), _t('Recording'), _t('Mixing')],
|
||||
foldedColumns: [_t('Published')],
|
||||
get description() {
|
||||
return renderToMarkup("project.example.generic");
|
||||
},
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@
|
||||
|
||||
import { useState, onRendered, useRef } from "@odoo/owl";
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { CharField } from "@web/views/fields/char/char_field";
|
||||
import { useAutoresize } from "@web/core/utils/autoresize";
|
||||
|
||||
export class TodoEditableBreadcrumbName extends CharField {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.placeholder = _lt("Untitled to-do");;
|
||||
this.placeholder = _t("Untitled to-do");;
|
||||
this.input = useRef("input");
|
||||
|
||||
this.stateTodo = useState({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { FloatField, floatField } from "@web/views/fields/float/float_field";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ export class ProductDiscountField extends FloatField {
|
||||
const isFirstOrderLine = this.props.record.resId === orderLines[0].resId;
|
||||
if (isFirstOrderLine && sameValue(orderLines)) {
|
||||
this.dialogService.add(ConfirmationDialog, {
|
||||
body: _lt("Do you want to apply this value to all lines?"),
|
||||
body: _t("Do you want to apply this value to all lines?"),
|
||||
confirm: () => {
|
||||
const commands = orderLines.slice(1).map((line) => {
|
||||
return {
|
||||
@@ -62,7 +62,7 @@ ProductDiscountField.template = "sale.ProductDiscountField";
|
||||
export const productDiscountField = {
|
||||
...floatField,
|
||||
component: ProductDiscountField,
|
||||
displayName: _lt("Disc.%"),
|
||||
displayName: _t("Disc.%"),
|
||||
};
|
||||
|
||||
registry.category("fields").add("sol_discount", productDiscountField)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { PhoneField, phoneField, formPhoneField } from "@web/views/fields/phone/phone_field";
|
||||
import { SendSMSButton } from '@sms/components/sms_button/sms_button';
|
||||
@@ -27,7 +27,7 @@ const patchDescr = {
|
||||
return props;
|
||||
},
|
||||
supportedOptions: [{
|
||||
label: _lt("Enable SMS"),
|
||||
label: _t("Enable SMS"),
|
||||
name: "enable_sms",
|
||||
type: "boolean",
|
||||
default: true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export const FILTER_DATE_OPTION = {
|
||||
quarter: ["first_quarter", "second_quarter", "third_quarter", "fourth_quarter"],
|
||||
@@ -10,16 +10,16 @@ export const FILTER_DATE_OPTION = {
|
||||
// TODO Remove this mapping, We should only need number > description to avoid multiple conversions
|
||||
// This would require a migration though
|
||||
export const monthsOptions = [
|
||||
{ id: "january", description: _lt("January") },
|
||||
{ id: "february", description: _lt("February") },
|
||||
{ id: "march", description: _lt("March") },
|
||||
{ id: "april", description: _lt("April") },
|
||||
{ id: "may", description: _lt("May") },
|
||||
{ id: "june", description: _lt("June") },
|
||||
{ id: "july", description: _lt("July") },
|
||||
{ id: "august", description: _lt("August") },
|
||||
{ id: "september", description: _lt("September") },
|
||||
{ id: "october", description: _lt("October") },
|
||||
{ id: "november", description: _lt("November") },
|
||||
{ id: "december", description: _lt("December") },
|
||||
{ id: "january", description: _t("January") },
|
||||
{ id: "february", description: _t("February") },
|
||||
{ id: "march", description: _t("March") },
|
||||
{ id: "april", description: _t("April") },
|
||||
{ id: "may", description: _t("May") },
|
||||
{ id: "june", description: _t("June") },
|
||||
{ id: "july", description: _t("July") },
|
||||
{ id: "august", description: _t("August") },
|
||||
{ id: "september", description: _t("September") },
|
||||
{ id: "october", description: _t("October") },
|
||||
{ id: "november", description: _t("November") },
|
||||
{ id: "december", description: _t("December") },
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export const DEFAULT_LINES_NUMBER = 20;
|
||||
|
||||
@@ -16,14 +16,14 @@ export const HEADER_STYLE = { fillColor: "#E6F2F3" };
|
||||
export const TOP_LEVEL_STYLE = { bold: true, fillColor: "#E6F2F3" };
|
||||
export const MEASURE_STYLE = { fillColor: "#E6F2F3", textColor: "#756f6f" };
|
||||
|
||||
export const UNTITLED_SPREADSHEET_NAME = _lt("Untitled spreadsheet");
|
||||
export const UNTITLED_SPREADSHEET_NAME = _t("Untitled spreadsheet");
|
||||
|
||||
export const RELATIVE_DATE_RANGE_TYPES = [
|
||||
{ type: "year_to_date", description: _lt("Year to Date") },
|
||||
{ type: "last_week", description: _lt("Last 7 Days") },
|
||||
{ type: "last_month", description: _lt("Last 30 Days") },
|
||||
{ type: "last_three_months", description: _lt("Last 90 Days") },
|
||||
{ type: "last_six_months", description: _lt("Last 180 Days") },
|
||||
{ type: "last_year", description: _lt("Last 365 Days") },
|
||||
{ type: "last_three_years", description: _lt("Last 3 Years") },
|
||||
{ type: "year_to_date", description: _t("Year to Date") },
|
||||
{ type: "last_week", description: _t("Last 7 Days") },
|
||||
{ type: "last_month", description: _t("Last 30 Days") },
|
||||
{ type: "last_three_months", description: _t("Last 90 Days") },
|
||||
{ type: "last_six_months", description: _t("Last 180 Days") },
|
||||
{ type: "last_year", description: _t("Last 365 Days") },
|
||||
{ type: "last_three_years", description: _t("Last 3 Years") },
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @odoo-module */
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import * as spreadsheet from "@odoo/o-spreadsheet";
|
||||
|
||||
@@ -44,7 +44,7 @@ invalidateCFEvaluationCommands.add("INSERT_ODOO_LIST");
|
||||
invalidateCFEvaluationCommands.add("REMOVE_ODOO_LIST");
|
||||
|
||||
cellMenuRegistry.add("list_see_record", {
|
||||
name: _lt("See record"),
|
||||
name: _t("See record"),
|
||||
sequence: 200,
|
||||
execute: async (env) => {
|
||||
const position = env.model.getters.getActivePosition();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @odoo-module */
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import * as spreadsheet from "@odoo/o-spreadsheet";
|
||||
|
||||
@@ -42,7 +42,7 @@ invalidateCFEvaluationCommands.add("REMOVE_PIVOT");
|
||||
invalidateCFEvaluationCommands.add("INSERT_PIVOT");
|
||||
|
||||
cellMenuRegistry.add("pivot_see_records", {
|
||||
name: _lt("See records"),
|
||||
name: _t("See records"),
|
||||
sequence: 175,
|
||||
execute: async (env) => {
|
||||
const position = env.model.getters.getActivePosition();
|
||||
|
||||
@@ -6,12 +6,12 @@ import { download } from "@web/core/network/download";
|
||||
|
||||
import * as spreadsheet from "@odoo/o-spreadsheet";
|
||||
import { Spreadsheet, Model, registries } from "@odoo/o-spreadsheet";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { loadSpreadsheetDependencies } from "../helpers/helpers";
|
||||
import { migrate } from "../o_spreadsheet/migration";
|
||||
|
||||
registries.topbarMenuRegistry.addChild("download_public_excel", ["file"], {
|
||||
name: _lt("Download"),
|
||||
name: _t("Download"),
|
||||
execute: (env) => env.downloadExcel(),
|
||||
isReadonlyAllowed: true,
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt, _t } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
|
||||
import * as spreadsheet from "@odoo/o-spreadsheet";
|
||||
@@ -129,21 +129,21 @@ export function parseAccountingDate(dateRange, locale) {
|
||||
}
|
||||
|
||||
const ODOO_FIN_ARGS = () => [
|
||||
arg("account_codes (string)", _lt("The prefix of the accounts.")),
|
||||
arg("account_codes (string)", _t("The prefix of the accounts.")),
|
||||
arg(
|
||||
"date_range (string, date)",
|
||||
_lt(`The date range. Supported formats are "21/12/2022", "Q1/2022", "12/2022", and "2022".`)
|
||||
_t(`The date range. Supported formats are "21/12/2022", "Q1/2022", "12/2022", and "2022".`)
|
||||
),
|
||||
arg("offset (number, default=0)", _lt("Year offset applied to date_range.")),
|
||||
arg("company_id (number, optional)", _lt("The company to target (Advanced).")),
|
||||
arg("offset (number, default=0)", _t("Year offset applied to date_range.")),
|
||||
arg("company_id (number, optional)", _t("The company to target (Advanced).")),
|
||||
arg(
|
||||
"include_unposted (boolean, default=FALSE)",
|
||||
_lt("Set to TRUE to include unposted entries.")
|
||||
_t("Set to TRUE to include unposted entries.")
|
||||
),
|
||||
];
|
||||
|
||||
functionRegistry.add("ODOO.CREDIT", {
|
||||
description: _lt("Get the total credit for the specified account(s) and period."),
|
||||
description: _t("Get the total credit for the specified account(s) and period."),
|
||||
args: ODOO_FIN_ARGS(),
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
@@ -178,7 +178,7 @@ functionRegistry.add("ODOO.CREDIT", {
|
||||
});
|
||||
|
||||
functionRegistry.add("ODOO.DEBIT", {
|
||||
description: _lt("Get the total debit for the specified account(s) and period."),
|
||||
description: _t("Get the total debit for the specified account(s) and period."),
|
||||
args: ODOO_FIN_ARGS(),
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
@@ -213,7 +213,7 @@ functionRegistry.add("ODOO.DEBIT", {
|
||||
});
|
||||
|
||||
functionRegistry.add("ODOO.BALANCE", {
|
||||
description: _lt("Get the total balance for the specified account(s) and period."),
|
||||
description: _t("Get the total balance for the specified account(s) and period."),
|
||||
args: ODOO_FIN_ARGS(),
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
@@ -257,12 +257,12 @@ functionRegistry.add("ODOO.BALANCE", {
|
||||
});
|
||||
|
||||
functionRegistry.add("ODOO.FISCALYEAR.START", {
|
||||
description: _lt(
|
||||
description: _t(
|
||||
"Returns the starting date of the fiscal year encompassing the provided date."
|
||||
),
|
||||
args: [
|
||||
arg("date (date)", _lt("Reference date.")),
|
||||
arg("company_id (number, optional)", _lt("The company.")),
|
||||
arg("date (date)", _t("Reference date.")),
|
||||
arg("company_id (number, optional)", _t("The company.")),
|
||||
],
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
@@ -279,10 +279,10 @@ functionRegistry.add("ODOO.FISCALYEAR.START", {
|
||||
});
|
||||
|
||||
functionRegistry.add("ODOO.FISCALYEAR.END", {
|
||||
description: _lt("Returns the ending date of the fiscal year encompassing the provided date."),
|
||||
description: _t("Returns the ending date of the fiscal year encompassing the provided date."),
|
||||
args: [
|
||||
arg("date (date)", _lt("Reference date.")),
|
||||
arg("company_id (number, optional)", _lt("The company.")),
|
||||
arg("date (date)", _t("Reference date.")),
|
||||
arg("company_id (number, optional)", _t("The company.")),
|
||||
],
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
@@ -299,8 +299,8 @@ functionRegistry.add("ODOO.FISCALYEAR.END", {
|
||||
});
|
||||
|
||||
functionRegistry.add("ODOO.ACCOUNT.GROUP", {
|
||||
description: _lt("Returns the account ids of a given group."),
|
||||
args: [arg("type (string)", _lt("Account type."))],
|
||||
description: _t("Returns the account ids of a given group."),
|
||||
args: [arg("type (string)", _t("Account type."))],
|
||||
category: "Odoo",
|
||||
returns: ["NUMBER"],
|
||||
compute: function (accountType) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import * as spreadsheet from "@odoo/o-spreadsheet";
|
||||
import AccountingPlugin from "./plugins/accounting_plugin";
|
||||
import { getFirstAccountFunction, getNumberOfAccountFormulas } from "./utils";
|
||||
@@ -14,7 +14,7 @@ const { toString, toBoolean } = spreadsheet.helpers;
|
||||
featurePluginRegistry.add("odooAccountingAggregates", AccountingPlugin);
|
||||
|
||||
cellMenuRegistry.add("move_lines_see_records", {
|
||||
name: _lt("See records"),
|
||||
name: _t("See records"),
|
||||
sequence: 176,
|
||||
async execute(env) {
|
||||
const position = env.model.getters.getActivePosition();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
|
||||
const { Component, onWillStart, onWillUpdateProps } = owl;
|
||||
@@ -18,7 +18,7 @@ export class JsonPopOver extends Component {
|
||||
|
||||
export const jsonPopOver = {
|
||||
component: JsonPopOver,
|
||||
displayName: _lt("Json Popup"),
|
||||
displayName: _t("Json Popup"),
|
||||
supportedTypes: ["char"],
|
||||
};
|
||||
|
||||
|
||||
@@ -5,16 +5,16 @@ import SurveyPreloadImageMixin from "@survey/js/survey_preload_image_mixin";
|
||||
import SurveySessionChart from "@survey/js/survey_session_chart";
|
||||
import SurveySessionTextAnswers from "@survey/js/survey_session_text_answers";
|
||||
import SurveySessionLeaderBoard from "@survey/js/survey_session_leaderboard";
|
||||
import {_lt} from "@web/legacy/js/services/core";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
const nextPageTooltips = {
|
||||
closingWords: _lt('End of Survey'),
|
||||
leaderboard: _lt('Show Leaderboard'),
|
||||
leaderboardFinal: _lt('Show Final Leaderboard'),
|
||||
nextQuestion: _lt('Next'),
|
||||
results: _lt('Show Correct Answer(s)'),
|
||||
startScreen: _lt('Start'),
|
||||
userInputs: _lt('Show Results'),
|
||||
closingWords: _t('End of Survey'),
|
||||
leaderboard: _t('Show Leaderboard'),
|
||||
leaderboardFinal: _t('Show Final Leaderboard'),
|
||||
nextQuestion: _t('Next'),
|
||||
results: _t('Show Correct Answer(s)'),
|
||||
startScreen: _t('Start'),
|
||||
userInputs: _t('Show Results'),
|
||||
};
|
||||
|
||||
publicWidget.registry.SurveySessionManage = publicWidget.Widget.extend(SurveyPreloadImageMixin, {
|
||||
@@ -102,7 +102,7 @@ publicWidget.registry.SurveySessionManage = publicWidget.Widget.extend(SurveyPre
|
||||
container: 'body',
|
||||
offset: '0, 3',
|
||||
content: function () {
|
||||
return _lt("Copied!");
|
||||
return _t("Copied!");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -412,7 +412,7 @@ publicWidget.registry.SurveySessionManage = publicWidget.Widget.extend(SurveyPre
|
||||
// Display last screen if leaderboard activated
|
||||
this.isLastQuestion = true;
|
||||
this._setupLeaderboard().then(function () {
|
||||
self.$('.o_survey_session_leaderboard_title').text(_lt('Final Leaderboard'));
|
||||
self.$('.o_survey_session_leaderboard_title').text(_t('Final Leaderboard'));
|
||||
self.$('.o_survey_session_navigation_next').addClass('d-none');
|
||||
self.$('.o_survey_leaderboard_buttons').removeClass('d-none');
|
||||
self.leaderBoard.showLeaderboard(false, false);
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { sprintf } from '@web/core/utils/strings';
|
||||
import { standardWidgetProps } from "@web/views/widgets/standard_widget_props";
|
||||
@@ -22,11 +22,11 @@ export class SurveyQuestionTriggerWidget extends Component {
|
||||
if (triggerError === "MISPLACED_TRIGGER_WARNING") {
|
||||
this.state.surveyIconWarning = true;
|
||||
this.state.triggerTooltip = sprintf(
|
||||
'⚠ ' + _lt('This question is positioned before its trigger ("%s") and will be skipped.'),
|
||||
'⚠ ' + _t('This question is positioned before its trigger ("%s") and will be skipped.'),
|
||||
triggeringQuestionTitle);
|
||||
} else if (triggerError === "WRONG_QUESTIONS_SELECTION_WARNING") {
|
||||
this.state.surveyIconWarning = true;
|
||||
this.state.triggerTooltip = '⚠ ' + _lt(
|
||||
this.state.triggerTooltip = '⚠ ' + _t(
|
||||
'Conditional display is not available when questions are randomly picked.');
|
||||
} else if (triggerError === "MISSING_TRIGGER_ERROR") {
|
||||
// This case must be handled to not temporarily render the "normal" icon if previously
|
||||
@@ -34,7 +34,7 @@ export class SurveyQuestionTriggerWidget extends Component {
|
||||
// at next save (auto on survey form and primary list view).
|
||||
} else {
|
||||
this.state.surveyIconWarning = false;
|
||||
this.state.triggerTooltip = sprintf(_lt('Displayed if "%s: %s"'),
|
||||
this.state.triggerTooltip = sprintf(_t('Displayed if "%s: %s"'),
|
||||
triggeringQuestionTitle, this.props.record.data.triggering_answer_id[1]);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
const exampleData = {
|
||||
ghostColumns: [_lt('Ideas'), _lt('Design'), _lt('Review'), _lt('Send'), _lt('Done')],
|
||||
applyExamplesText: _lt("Use This For My Campaigns"),
|
||||
ghostColumns: [_t('Ideas'), _t('Design'), _t('Review'), _t('Send'), _t('Done')],
|
||||
applyExamplesText: _t("Use This For My Campaigns"),
|
||||
allowedGroupBys: ['stage_id'],
|
||||
examples: [{
|
||||
name: _lt('Creative Flow'),
|
||||
columns: [_lt('Ideas'), _lt('Design'), _lt('Review'), _lt('Send'), _lt('Done')],
|
||||
description: _lt("Collect ideas, design creative content and publish it once reviewed."),
|
||||
name: _t('Creative Flow'),
|
||||
columns: [_t('Ideas'), _t('Design'), _t('Review'), _t('Send'), _t('Done')],
|
||||
description: _t("Collect ideas, design creative content and publish it once reviewed."),
|
||||
}, {
|
||||
name: _lt('Event-driven Flow'),
|
||||
columns: [_lt('Later'), _lt('This Month'), _lt('This Week'), _lt('Running'), _lt('Sent')],
|
||||
description: _lt("Track incoming events (e.g. Christmas, Black Friday, ...) and publish timely content."),
|
||||
name: _t('Event-driven Flow'),
|
||||
columns: [_t('Later'), _t('This Month'), _t('This Week'), _t('Running'), _t('Sent')],
|
||||
description: _t("Track incoming events (e.g. Christmas, Black Friday, ...) and publish timely content."),
|
||||
}, {
|
||||
name: _lt('Soft-Launch Flow'),
|
||||
columns: [_lt('Pre-Launch'), _lt('Soft-Launch'), _lt('Deploy'), _lt('Report'), _lt('Done')],
|
||||
description: _lt("Prepare your Campaign, test it with part of your audience and deploy it fully afterwards."),
|
||||
name: _t('Soft-Launch Flow'),
|
||||
columns: [_t('Pre-Launch'), _t('Soft-Launch'), _t('Deploy'), _t('Report'), _t('Done')],
|
||||
description: _t("Prepare your Campaign, test it with part of your audience and deploy it fully afterwards."),
|
||||
}, {
|
||||
name: _lt('Audience-driven Flow'),
|
||||
columns: [_lt('Gather Data'), _lt('List-Building'), _lt('Copywriting'), _lt('Sent')],
|
||||
description: _lt("Gather data, build a recipient list and write content based on your Marketing target."),
|
||||
name: _t('Audience-driven Flow'),
|
||||
columns: [_t('Gather Data'), _t('List-Building'), _t('Copywriting'), _t('Sent')],
|
||||
description: _t("Gather data, build a recipient list and write content based on your Marketing target."),
|
||||
}, {
|
||||
name: _lt('Approval-based Flow'),
|
||||
columns: [_lt('To be Approved'), _lt('Approved'), _lt('Deployed')],
|
||||
description: _lt("Prepare Campaigns and get them approved before making them go live."),
|
||||
name: _t('Approval-based Flow'),
|
||||
columns: [_t('To be Approved'), _t('Approved'), _t('Deployed')],
|
||||
description: _t("Prepare Campaigns and get them approved before making them go live."),
|
||||
}],
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { Component, useRef, useState, useExternalListener } from "@odoo/owl";
|
||||
|
||||
@@ -36,18 +36,18 @@ export class ColorList extends Component {
|
||||
}
|
||||
|
||||
ColorList.COLORS = [
|
||||
_lt("No color"),
|
||||
_lt("Red"),
|
||||
_lt("Orange"),
|
||||
_lt("Yellow"),
|
||||
_lt("Cyan"),
|
||||
_lt("Purple"),
|
||||
_lt("Almond"),
|
||||
_lt("Teal"),
|
||||
_lt("Blue"),
|
||||
_lt("Raspberry"),
|
||||
_lt("Green"),
|
||||
_lt("Violet"),
|
||||
_t("No color"),
|
||||
_t("Red"),
|
||||
_t("Orange"),
|
||||
_t("Yellow"),
|
||||
_t("Cyan"),
|
||||
_t("Purple"),
|
||||
_t("Almond"),
|
||||
_t("Teal"),
|
||||
_t("Blue"),
|
||||
_t("Raspberry"),
|
||||
_t("Green"),
|
||||
_t("Violet"),
|
||||
];
|
||||
ColorList.template = "web.ColorList";
|
||||
ColorList.defaultProps = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { useHotkey } from "@web/core/hotkeys/hotkey_hook";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { KeepLast } from "@web/core/utils/concurrency";
|
||||
import { useAutofocus, useService } from "@web/core/utils/hooks";
|
||||
import { scrollTo } from "@web/core/utils/scrolling";
|
||||
@@ -22,8 +22,8 @@ import {
|
||||
useExternalListener,
|
||||
} from "@odoo/owl";
|
||||
|
||||
const DEFAULT_PLACEHOLDER = _lt("Search...");
|
||||
const DEFAULT_EMPTY_MESSAGE = _lt("No result found");
|
||||
const DEFAULT_PLACEHOLDER = _t("Search...");
|
||||
const DEFAULT_EMPTY_MESSAGE = _t("No result found");
|
||||
const FUZZY_NAMESPACES = ["default"];
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { isMacOS } from "@web/core/browser/feature_detection";
|
||||
import { useHotkey } from "@web/core/hotkeys/hotkey_hook";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { capitalize } from "@web/core/utils/strings";
|
||||
import { getVisibleElements } from "@web/core/utils/ui";
|
||||
@@ -12,8 +12,8 @@ import { Component } from "@odoo/owl";
|
||||
|
||||
const commandSetupRegistry = registry.category("command_setup");
|
||||
commandSetupRegistry.add("default", {
|
||||
emptyMessage: _lt("No command found"),
|
||||
placeholder: _lt("Search for a command..."),
|
||||
emptyMessage: _t("No command found"),
|
||||
placeholder: _t("Search for a command..."),
|
||||
});
|
||||
|
||||
export class HotkeyCommandItem extends Component {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { Dialog } from "../dialog/dialog";
|
||||
import { _lt } from "../l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useChildRef } from "@web/core/utils/hooks";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
@@ -73,10 +73,10 @@ ConfirmationDialog.props = {
|
||||
cancelLabel: { type: String, optional: true },
|
||||
};
|
||||
ConfirmationDialog.defaultProps = {
|
||||
confirmLabel: _lt("Ok"),
|
||||
cancelLabel: _lt("Cancel"),
|
||||
confirmLabel: _t("Ok"),
|
||||
cancelLabel: _t("Cancel"),
|
||||
confirmClass: "btn-primary",
|
||||
title: _lt("Confirmation"),
|
||||
title: _t("Confirmation"),
|
||||
};
|
||||
|
||||
export class AlertDialog extends ConfirmationDialog {}
|
||||
@@ -87,5 +87,5 @@ AlertDialog.props = {
|
||||
};
|
||||
AlertDialog.defaultProps = {
|
||||
...ConfirmationDialog.defaultProps,
|
||||
title: _lt("Alert"),
|
||||
title: _t("Alert"),
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Component, onWillRender, onWillUpdateProps, useState } from "@odoo/owl";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import {
|
||||
MAX_VALID_DATE,
|
||||
MIN_VALID_DATE,
|
||||
@@ -151,9 +151,9 @@ const MERIDIEMS = ["AM", "PM"];
|
||||
*/
|
||||
const PRECISION_LEVELS = new Map()
|
||||
.set("days", {
|
||||
mainTitle: _lt("Select month"),
|
||||
nextTitle: _lt("Next month"),
|
||||
prevTitle: _lt("Previous month"),
|
||||
mainTitle: _t("Select month"),
|
||||
nextTitle: _t("Next month"),
|
||||
prevTitle: _t("Previous month"),
|
||||
step: { month: 1 },
|
||||
getTitle: (date, { additionalMonth }) => {
|
||||
const titles = [`${date.monthLong} ${date.year}`];
|
||||
@@ -200,7 +200,7 @@ const PRECISION_LEVELS = new Map()
|
||||
d.range[0].weekdayLong,
|
||||
]);
|
||||
if (showWeekNumbers) {
|
||||
daysOfWeek.unshift(["#", _lt("Week numbers")]);
|
||||
daysOfWeek.unshift(["#", _t("Week numbers")]);
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -213,9 +213,9 @@ const PRECISION_LEVELS = new Map()
|
||||
},
|
||||
})
|
||||
.set("months", {
|
||||
mainTitle: _lt("Select year"),
|
||||
nextTitle: _lt("Next year"),
|
||||
prevTitle: _lt("Previous year"),
|
||||
mainTitle: _t("Select year"),
|
||||
nextTitle: _t("Next year"),
|
||||
prevTitle: _t("Previous year"),
|
||||
step: { year: 1 },
|
||||
getTitle: (date) => String(date.year),
|
||||
getItems: (date, { maxDate, minDate }) => {
|
||||
@@ -231,9 +231,9 @@ const PRECISION_LEVELS = new Map()
|
||||
},
|
||||
})
|
||||
.set("years", {
|
||||
mainTitle: _lt("Select decade"),
|
||||
nextTitle: _lt("Next decade"),
|
||||
prevTitle: _lt("Previous decade"),
|
||||
mainTitle: _t("Select decade"),
|
||||
nextTitle: _t("Next decade"),
|
||||
prevTitle: _t("Previous decade"),
|
||||
step: { year: 10 },
|
||||
getTitle: (date) => `${getStartOfDecade(date) - 1} - ${getStartOfDecade(date) + 10}`,
|
||||
getItems: (date, { maxDate, minDate }) => {
|
||||
@@ -250,9 +250,9 @@ const PRECISION_LEVELS = new Map()
|
||||
},
|
||||
})
|
||||
.set("decades", {
|
||||
mainTitle: _lt("Select century"),
|
||||
nextTitle: _lt("Next century"),
|
||||
prevTitle: _lt("Previous century"),
|
||||
mainTitle: _t("Select century"),
|
||||
nextTitle: _t("Next century"),
|
||||
prevTitle: _t("Previous century"),
|
||||
step: { year: 100 },
|
||||
getTitle: (date) => `${getStartOfCentury(date) - 10} - ${getStartOfCentury(date) + 100}`,
|
||||
getItems: (date, { maxDate, minDate }) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
serializeDate,
|
||||
serializeDateTime,
|
||||
} from "@web/core/l10n/dates";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { evaluateExpr, formatAST } from "@web/core/py_js/py";
|
||||
import { toPyValue } from "@web/core/py_js/py_utils";
|
||||
import { registry } from "@web/core/registry";
|
||||
@@ -238,8 +238,8 @@ const BOOLEAN = {
|
||||
value,
|
||||
update,
|
||||
options: [
|
||||
[true, _lt("set")],
|
||||
[false, _lt("not set")],
|
||||
[true, _t("set")],
|
||||
[false, _t("not set")],
|
||||
],
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { formatValue, toValue } from "@web/core/domain_tree";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { parseExpr } from "@web/core/py_js/py";
|
||||
@@ -21,25 +21,25 @@ export const OPERATOR_DESCRIPTIONS = {
|
||||
">": { label: ">", valueCount: 1 },
|
||||
">=": { label: ">=", valueCount: 1 },
|
||||
"=?": { label: "=?", valueCount: 1 },
|
||||
"=like": { label: _lt("=like"), valueCount: 1 },
|
||||
"=ilike": { label: _lt("=ilike"), valueCount: 1 },
|
||||
like: { label: _lt("like"), valueCount: 1 },
|
||||
"not like": { label: _lt("not like"), valueCount: 1 },
|
||||
ilike: { label: _lt("contains"), valueCount: 1 },
|
||||
"not ilike": { label: _lt("does not contain"), valueCount: 1 },
|
||||
in: { label: _lt("is in"), valueCount: "variable" },
|
||||
"not in": { label: _lt("is not in"), valueCount: "variable" },
|
||||
child_of: { label: _lt("child of"), valueCount: 1 },
|
||||
parent_of: { label: _lt("parent of"), valueCount: 1 },
|
||||
"=like": { label: _t("=like"), valueCount: 1 },
|
||||
"=ilike": { label: _t("=ilike"), valueCount: 1 },
|
||||
like: { label: _t("like"), valueCount: 1 },
|
||||
"not like": { label: _t("not like"), valueCount: 1 },
|
||||
ilike: { label: _t("contains"), valueCount: 1 },
|
||||
"not ilike": { label: _t("does not contain"), valueCount: 1 },
|
||||
in: { label: _t("is in"), valueCount: "variable" },
|
||||
"not in": { label: _t("is not in"), valueCount: "variable" },
|
||||
child_of: { label: _t("child of"), valueCount: 1 },
|
||||
parent_of: { label: _t("parent of"), valueCount: 1 },
|
||||
|
||||
// virtual operators (replace = and != in some cases)
|
||||
is: { label: _lt("is"), valueCount: 1 },
|
||||
is_not: { label: _lt("is not"), valueCount: 1 },
|
||||
set: { label: _lt("is set"), valueCount: 0 },
|
||||
not_set: { label: _lt("is not set"), valueCount: 0 },
|
||||
is: { label: _t("is"), valueCount: 1 },
|
||||
is_not: { label: _t("is not"), valueCount: 1 },
|
||||
set: { label: _t("is set"), valueCount: 0 },
|
||||
not_set: { label: _t("is not set"), valueCount: 0 },
|
||||
|
||||
// virtual operator (equivalent to a couple (>=,<=))
|
||||
between: { label: _lt("is between"), valueCount: 2 },
|
||||
between: { label: _t("is between"), valueCount: 2 },
|
||||
};
|
||||
|
||||
function toKey(operator, negate = false) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
|
||||
import { browser } from "../browser/browser";
|
||||
import { Dialog } from "../dialog/dialog";
|
||||
import { _lt } from "../l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "../registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { capitalize } from "../utils/strings";
|
||||
@@ -24,15 +24,15 @@ export const standardErrorDialogProps = {
|
||||
|
||||
export const odooExceptionTitleMap = new Map(
|
||||
Object.entries({
|
||||
"odoo.addons.base.models.ir_mail_server.MailDeliveryException": _lt(
|
||||
"odoo.addons.base.models.ir_mail_server.MailDeliveryException": _t(
|
||||
"MailDeliveryException"
|
||||
),
|
||||
"odoo.exceptions.AccessDenied": _lt("Access Denied"),
|
||||
"odoo.exceptions.MissingError": _lt("Missing Record"),
|
||||
"odoo.exceptions.UserError": _lt("User Error"),
|
||||
"odoo.exceptions.ValidationError": _lt("Validation Error"),
|
||||
"odoo.exceptions.AccessError": _lt("Access Error"),
|
||||
"odoo.exceptions.Warning": _lt("Warning"),
|
||||
"odoo.exceptions.AccessDenied": _t("Access Denied"),
|
||||
"odoo.exceptions.MissingError": _t("Missing Record"),
|
||||
"odoo.exceptions.UserError": _t("User Error"),
|
||||
"odoo.exceptions.ValidationError": _t("Validation Error"),
|
||||
"odoo.exceptions.AccessError": _t("Access Error"),
|
||||
"odoo.exceptions.Warning": _t("Warning"),
|
||||
})
|
||||
);
|
||||
|
||||
@@ -53,20 +53,20 @@ export class ErrorDialog extends Component {
|
||||
}
|
||||
ErrorDialog.template = "web.ErrorDialog";
|
||||
ErrorDialog.components = { Dialog };
|
||||
ErrorDialog.title = _lt("Odoo Error");
|
||||
ErrorDialog.title = _t("Odoo Error");
|
||||
ErrorDialog.props = { ...standardErrorDialogProps };
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Client Error Dialog
|
||||
// -----------------------------------------------------------------------------
|
||||
export class ClientErrorDialog extends ErrorDialog {}
|
||||
ClientErrorDialog.title = _lt("Odoo Client Error");
|
||||
ClientErrorDialog.title = _t("Odoo Client Error");
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Network Error Dialog
|
||||
// -----------------------------------------------------------------------------
|
||||
export class NetworkErrorDialog extends ErrorDialog {}
|
||||
NetworkErrorDialog.title = _lt("Odoo Network Error");
|
||||
NetworkErrorDialog.title = _t("Odoo Network Error");
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// RPC Error Dialog
|
||||
@@ -173,7 +173,7 @@ RedirectWarningDialog.props = { ...standardErrorDialogProps };
|
||||
export class Error504Dialog extends Component {}
|
||||
Error504Dialog.template = "web.Error504Dialog";
|
||||
Error504Dialog.components = { Dialog };
|
||||
Error504Dialog.title = _lt("Request timeout");
|
||||
Error504Dialog.title = _t("Request timeout");
|
||||
Error504Dialog.props = { ...standardErrorDialogProps };
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
@@ -186,7 +186,7 @@ export class SessionExpiredDialog extends Component {
|
||||
}
|
||||
SessionExpiredDialog.template = "web.SessionExpiredDialog";
|
||||
SessionExpiredDialog.components = { Dialog };
|
||||
SessionExpiredDialog.title = _lt("Odoo Session Expired");
|
||||
SessionExpiredDialog.title = _t("Odoo Session Expired");
|
||||
SessionExpiredDialog.props = { ...standardErrorDialogProps };
|
||||
|
||||
registry
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { browser } from "../browser/browser";
|
||||
import { _lt } from "../l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "../registry";
|
||||
import { completeUncaughtError, getErrorTechnicalName } from "./error_utils";
|
||||
import { isIOS } from "@web/core/browser/feature_detection";
|
||||
@@ -24,20 +24,20 @@ export class UncaughtError extends Error {
|
||||
}
|
||||
|
||||
export class UncaughtClientError extends UncaughtError {
|
||||
constructor(message = _lt("Uncaught Javascript Error")) {
|
||||
constructor(message = _t("Uncaught Javascript Error")) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
export class UncaughtPromiseError extends UncaughtError {
|
||||
constructor(message = _lt("Uncaught Promise")) {
|
||||
constructor(message = _t("Uncaught Promise")) {
|
||||
super(message);
|
||||
this.unhandledRejectionEvent = null;
|
||||
}
|
||||
}
|
||||
|
||||
export class UncaughtCorsError extends UncaughtError {
|
||||
constructor(message = _lt("Uncaught CORS Error")) {
|
||||
constructor(message = _t("Uncaught CORS Error")) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
class ScssErrorDialog extends Component {}
|
||||
ScssErrorDialog.template = "web.ScssErrorDialog";
|
||||
ScssErrorDialog.components = { Dialog };
|
||||
ScssErrorDialog.title = _lt("Style error");
|
||||
ScssErrorDialog.title = _t("Style error");
|
||||
|
||||
const scssErrorDisplayService = {
|
||||
dependencies: ["dialog"],
|
||||
|
||||
@@ -58,17 +58,17 @@ class LazyTranslatedString extends String {
|
||||
* strings we're using with a translation mark here so the extractor can do its
|
||||
* job.
|
||||
*/
|
||||
_lt("less than a minute ago");
|
||||
_lt("about a minute ago");
|
||||
_lt("%d minutes ago");
|
||||
_lt("about an hour ago");
|
||||
_lt("%d hours ago");
|
||||
_lt("a day ago");
|
||||
_lt("%d days ago");
|
||||
_lt("about a month ago");
|
||||
_lt("%d months ago");
|
||||
_lt("about a year ago");
|
||||
_lt("%d years ago");
|
||||
_t("less than a minute ago");
|
||||
_t("about a minute ago");
|
||||
_t("%d minutes ago");
|
||||
_t("about an hour ago");
|
||||
_t("%d hours ago");
|
||||
_t("a day ago");
|
||||
_t("%d days ago");
|
||||
_t("about a month ago");
|
||||
_t("%d months ago");
|
||||
_t("about a year ago");
|
||||
_t("%d years ago");
|
||||
|
||||
/**
|
||||
* Load the installed languages long names and code
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "../l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { makeErrorFromResponse, ConnectionLostError } from "@web/core/network/rpc_service";
|
||||
import { browser } from "@web/core/browser/browser";
|
||||
|
||||
@@ -371,7 +371,7 @@ function _download(data, filename, mimetype) {
|
||||
anchor.href = url;
|
||||
anchor.setAttribute("download", fileName);
|
||||
anchor.className = "download-js-link";
|
||||
anchor.innerText = _lt("downloading...");
|
||||
anchor.innerText = _t("downloading...");
|
||||
anchor.style.display = "none";
|
||||
document.body.appendChild(anchor);
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Component, useState, useRef, onWillUpdateProps, useEffect } from "@odoo/owl";
|
||||
import { Dropdown } from "@web/core/dropdown/dropdown";
|
||||
import { DropdownItem } from "@web/core/dropdown/dropdown_item";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useDebounced } from "@web/core/utils/timing";
|
||||
import { scrollTo } from "@web/core/utils/scrolling";
|
||||
import { fuzzyLookup } from "@web/core/utils/search";
|
||||
@@ -24,7 +24,7 @@ export class SelectMenu extends Component {
|
||||
onSelect: () => {},
|
||||
required: false,
|
||||
searchable: true,
|
||||
searchPlaceholder: _lt("Search..."),
|
||||
searchPlaceholder: _t("Search..."),
|
||||
choices: [],
|
||||
groups: [],
|
||||
};
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import Class from "@web/legacy/js/core/class";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
var TranslationDataBase = Class.extend(/** @lends instance.TranslationDataBase# */{
|
||||
init: function() {
|
||||
@@ -118,6 +117,5 @@ export var _t = new TranslationDataBase().build_translation_function();
|
||||
|
||||
export default {
|
||||
_t: _t,
|
||||
_lt: _lt,
|
||||
TranslationDataBase: TranslationDataBase,
|
||||
};
|
||||
|
||||
@@ -20,7 +20,6 @@ import { debounce } from "@web/core/utils/timing";
|
||||
import { uniqueId } from "@web/core/utils/functions";
|
||||
|
||||
var _t = core._t;
|
||||
var _lt = core._lt;
|
||||
|
||||
var TranslatableFieldMixin = {
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -62,7 +61,7 @@ var TranslatableFieldMixin = {
|
||||
|
||||
var FieldBoolean = AbstractField.extend({
|
||||
className: 'o_field_boolean',
|
||||
description: _lt("Checkbox"),
|
||||
description: _t("Checkbox"),
|
||||
events: Object.assign({}, AbstractField.prototype.events, {
|
||||
change: '_onChange',
|
||||
}),
|
||||
@@ -707,7 +706,7 @@ var NumericField = InputField.extend({
|
||||
});
|
||||
|
||||
var FieldChar = InputField.extend(TranslatableFieldMixin, {
|
||||
description: _lt("Text"),
|
||||
description: _t("Text"),
|
||||
className: 'o_field_char',
|
||||
tagName: 'span',
|
||||
supportedFieldTypes: ['char'],
|
||||
@@ -751,7 +750,7 @@ var FieldChar = InputField.extend(TranslatableFieldMixin, {
|
||||
});
|
||||
|
||||
var FieldDate = InputField.extend({
|
||||
description: _lt("Date"),
|
||||
description: _t("Date"),
|
||||
className: "o_field_date",
|
||||
tagName: "span",
|
||||
supportedFieldTypes: ['date', 'datetime'],
|
||||
@@ -907,7 +906,7 @@ var FieldDate = InputField.extend({
|
||||
});
|
||||
|
||||
var FieldDateTime = FieldDate.extend({
|
||||
description: _lt("Date & Time"),
|
||||
description: _t("Date & Time"),
|
||||
supportedFieldTypes: ['datetime'],
|
||||
isQuickEditable: true,
|
||||
|
||||
@@ -968,7 +967,7 @@ var FieldDateTime = FieldDate.extend({
|
||||
});
|
||||
|
||||
var FieldMonetary = NumericField.extend({
|
||||
description: _lt("Monetary"),
|
||||
description: _t("Monetary"),
|
||||
className: 'o_field_monetary o_field_number',
|
||||
tagName: 'span',
|
||||
supportedFieldTypes: ['float', 'monetary'],
|
||||
@@ -1081,7 +1080,7 @@ var FieldMonetary = NumericField.extend({
|
||||
});
|
||||
|
||||
var FieldInteger = NumericField.extend({
|
||||
description: _lt("Integer"),
|
||||
description: _t("Integer"),
|
||||
className: 'o_field_integer o_field_number',
|
||||
supportedFieldTypes: ['integer'],
|
||||
isQuickEditable: true,
|
||||
@@ -1116,7 +1115,7 @@ var FieldInteger = NumericField.extend({
|
||||
});
|
||||
|
||||
var FieldFloat = NumericField.extend({
|
||||
description: _lt("Decimal"),
|
||||
description: _t("Decimal"),
|
||||
className: 'o_field_float o_field_number',
|
||||
supportedFieldTypes: ['float'],
|
||||
isQuickEditable: true,
|
||||
@@ -1136,7 +1135,7 @@ var FieldFloat = NumericField.extend({
|
||||
});
|
||||
|
||||
var FieldFloatTime = FieldFloat.extend({
|
||||
description: _lt("Time"),
|
||||
description: _t("Time"),
|
||||
// this is not strictly necessary, as for this widget to be used, the 'widget'
|
||||
// attrs must be set to 'float_time', so the formatType is automatically
|
||||
// 'float_time', but for the sake of clarity, we explicitely define a
|
||||
@@ -1324,7 +1323,7 @@ var FieldFloatToggle = AbstractField.extend({
|
||||
|
||||
var FieldPercentage = FieldFloat.extend({
|
||||
className: 'o_field_float_percentage o_field_number',
|
||||
description: _lt("Percentage"),
|
||||
description: _t("Percentage"),
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -1361,7 +1360,7 @@ var FieldPercentage = FieldFloat.extend({
|
||||
});
|
||||
|
||||
var FieldText = InputField.extend(TranslatableFieldMixin, {
|
||||
description: _lt("Multiline Text"),
|
||||
description: _t("Multiline Text"),
|
||||
className: 'o_field_text',
|
||||
supportedFieldTypes: ['text', 'html'],
|
||||
tagName: 'span',
|
||||
@@ -1427,7 +1426,7 @@ var FieldText = InputField.extend(TranslatableFieldMixin, {
|
||||
});
|
||||
|
||||
var UrlWidget = InputField.extend({
|
||||
description: _lt("URL"),
|
||||
description: _t("URL"),
|
||||
className: 'o_field_url',
|
||||
events: Object.assign({}, InputField.prototype.events, {
|
||||
'click': '_onClick',
|
||||
@@ -1627,7 +1626,7 @@ var AbstractFieldBinary = AbstractField.extend({
|
||||
});
|
||||
|
||||
export var FieldBinaryFile = AbstractFieldBinary.extend({
|
||||
description: _lt("File"),
|
||||
description: _t("File"),
|
||||
template: 'FieldBinaryFile',
|
||||
events: Object.assign({}, AbstractFieldBinary.prototype.events, {
|
||||
'click': function (event) {
|
||||
@@ -1704,7 +1703,7 @@ export var FieldBinaryFile = AbstractFieldBinary.extend({
|
||||
* switching between a green bullet / gray bullet.
|
||||
*/
|
||||
var FieldToggleBoolean = AbstractField.extend({
|
||||
description: _lt("Button"),
|
||||
description: _t("Button"),
|
||||
template: "toggle_button",
|
||||
events: {
|
||||
'click': '_onToggleButton'
|
||||
|
||||
@@ -25,7 +25,6 @@ import { uniqueId } from "@web/core/utils/functions";
|
||||
import { sortBy } from "@web/core/utils/arrays";
|
||||
|
||||
var _t = core._t;
|
||||
var _lt = core._lt;
|
||||
var qweb = core.qweb;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -73,7 +72,7 @@ var M2ODialog = Dialog.extend({
|
||||
});
|
||||
|
||||
var FieldMany2One = AbstractField.extend({
|
||||
description: _lt("Many2one"),
|
||||
description: _t("Many2one"),
|
||||
supportedFieldTypes: ['many2one'],
|
||||
template: 'FieldMany2One',
|
||||
custom_events: Object.assign({}, AbstractField.prototype.custom_events, {
|
||||
@@ -976,7 +975,7 @@ const Many2OneAvatar = FieldMany2One.extend({
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var FieldMany2ManyTags = AbstractField.extend({
|
||||
description: _lt("Tags"),
|
||||
description: _t("Tags"),
|
||||
tag_template: "FieldMany2ManyTag",
|
||||
className: "o_field_many2manytags",
|
||||
supportedFieldTypes: ['many2many'],
|
||||
@@ -1416,7 +1415,7 @@ var FormFieldMany2ManyTags = FieldMany2ManyTags.extend({
|
||||
* of type 'selection' and 'many2one'.
|
||||
*/
|
||||
var FieldSelection = AbstractField.extend({
|
||||
description: _lt("Selection"),
|
||||
description: _t("Selection"),
|
||||
template: 'web.Legacy.FieldSelection',
|
||||
specialData: "_fetchSpecialRelation",
|
||||
supportedFieldTypes: ['selection'],
|
||||
@@ -1546,7 +1545,7 @@ var FieldSelection = AbstractField.extend({
|
||||
});
|
||||
|
||||
var FieldRadio = FieldSelection.extend({
|
||||
description: _lt("Radio"),
|
||||
description: _t("Radio"),
|
||||
template: null,
|
||||
className: 'o_field_radio',
|
||||
tagName: 'div',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { makeContext } from "@web/core/context";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { evaluateExpr } from "@web/core/py_js/py";
|
||||
import { XMLParser } from "@web/core/utils/xml";
|
||||
import { DEFAULT_INTERVAL, DEFAULT_PERIOD } from "@web/search/utils/dates";
|
||||
|
||||
const ALL = _lt("All");
|
||||
const ALL = _t("All");
|
||||
const DEFAULT_LIMIT = 200;
|
||||
const DEFAULT_VIEWS_WITH_SEARCH_PANEL = ["kanban", "list"];
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Domain } from "@web/core/domain";
|
||||
import { serializeDate, serializeDateTime } from "@web/core/l10n/dates";
|
||||
import { localization } from "@web/core/l10n/localization";
|
||||
@@ -8,10 +8,10 @@ import { localization } from "@web/core/l10n/localization";
|
||||
export const DEFAULT_PERIOD = "this_month";
|
||||
|
||||
export const QUARTERS = {
|
||||
1: { description: _lt("Q1"), coveredMonths: [1, 2, 3] },
|
||||
2: { description: _lt("Q2"), coveredMonths: [4, 5, 6] },
|
||||
3: { description: _lt("Q3"), coveredMonths: [7, 8, 9] },
|
||||
4: { description: _lt("Q4"), coveredMonths: [10, 11, 12] },
|
||||
1: { description: _t("Q1"), coveredMonths: [1, 2, 3] },
|
||||
2: { description: _t("Q2"), coveredMonths: [4, 5, 6] },
|
||||
3: { description: _t("Q3"), coveredMonths: [7, 8, 9] },
|
||||
4: { description: _t("Q4"), coveredMonths: [10, 11, 12] },
|
||||
};
|
||||
|
||||
export const MONTH_OPTIONS = {
|
||||
@@ -98,21 +98,21 @@ export const PERIOD_OPTIONS = Object.assign({}, MONTH_OPTIONS, QUARTER_OPTIONS,
|
||||
export const DEFAULT_INTERVAL = "month";
|
||||
|
||||
export const INTERVAL_OPTIONS = {
|
||||
year: { description: _lt("Year"), id: "year", groupNumber: 1 },
|
||||
quarter: { description: _lt("Quarter"), id: "quarter", groupNumber: 1 },
|
||||
month: { description: _lt("Month"), id: "month", groupNumber: 1 },
|
||||
week: { description: _lt("Week"), id: "week", groupNumber: 1 },
|
||||
day: { description: _lt("Day"), id: "day", groupNumber: 1 },
|
||||
year: { description: _t("Year"), id: "year", groupNumber: 1 },
|
||||
quarter: { description: _t("Quarter"), id: "quarter", groupNumber: 1 },
|
||||
month: { description: _t("Month"), id: "month", groupNumber: 1 },
|
||||
week: { description: _t("Week"), id: "week", groupNumber: 1 },
|
||||
day: { description: _t("Day"), id: "day", groupNumber: 1 },
|
||||
};
|
||||
|
||||
// ComparisonMenu parameters
|
||||
export const COMPARISON_OPTIONS = {
|
||||
previous_period: {
|
||||
description: _lt("Previous Period"),
|
||||
description: _t("Previous Period"),
|
||||
id: "previous_period",
|
||||
},
|
||||
previous_year: {
|
||||
description: _lt("Previous Year"),
|
||||
description: _t("Previous Year"),
|
||||
id: "previous_year",
|
||||
plusParam: { years: -1 },
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
|
||||
import { _t, _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useOwnedDialogs, useService } from "@web/core/utils/hooks";
|
||||
import { sprintf } from "@web/core/utils/strings";
|
||||
import { Layout } from "@web/search/layout";
|
||||
@@ -20,10 +20,10 @@ import { CogMenu } from "@web/search/cog_menu/cog_menu";
|
||||
import { Component, useState } from "@odoo/owl";
|
||||
|
||||
export const SCALE_LABELS = {
|
||||
day: _lt("Day"),
|
||||
week: _lt("Week"),
|
||||
month: _lt("Month"),
|
||||
year: _lt("Year"),
|
||||
day: _t("Day"),
|
||||
week: _t("Week"),
|
||||
month: _t("Month"),
|
||||
year: _t("Year"),
|
||||
};
|
||||
|
||||
function useUniqueDialog() {
|
||||
@@ -207,7 +207,7 @@ export class CalendarController extends Component {
|
||||
confirm: () => {
|
||||
this.model.unlinkRecord(record.id);
|
||||
},
|
||||
confirmLabel: _lt("Delete"),
|
||||
confirmLabel: _t("Delete"),
|
||||
cancel: () => {
|
||||
// `ConfirmationDialog` needs this prop to display the cancel
|
||||
// button but we do nothing on cancel.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useAutofocus, useService } from "@web/core/utils/hooks";
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
|
||||
@@ -14,7 +14,7 @@ export class CalendarQuickCreate extends Component {
|
||||
}
|
||||
|
||||
get dialogTitle() {
|
||||
return _lt("New Event");
|
||||
return _t("New Event");
|
||||
}
|
||||
|
||||
get recordTitle() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { evalDomain } from "@web/core/domain";
|
||||
import { editModelDebug } from "@web/core/debug/debug_utils";
|
||||
@@ -34,7 +34,7 @@ GetViewDialog.props = {
|
||||
arch: { type: String },
|
||||
close: { type: Function },
|
||||
};
|
||||
GetViewDialog.title = _lt("Get View");
|
||||
GetViewDialog.title = _t("Get View");
|
||||
|
||||
export function getView({ component, env }) {
|
||||
let { arch } = component.props;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useBus, useService } from "@web/core/utils/hooks";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
@@ -67,10 +67,10 @@ export class AceField extends Component {
|
||||
|
||||
export const aceField = {
|
||||
component: AceField,
|
||||
displayName: _lt("Ace Editor"),
|
||||
displayName: _t("Ace Editor"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Mode"),
|
||||
label: _t("Mode"),
|
||||
name: "mode",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
@@ -11,7 +11,7 @@ export class AttachmentImageField extends Component {
|
||||
|
||||
export const attachmentImageField = {
|
||||
component: AttachmentImageField,
|
||||
displayName: _lt("Attachment Image"),
|
||||
displayName: _t("Attachment Image"),
|
||||
supportedTypes: ["many2one"],
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { evaluateExpr } from "@web/core/py_js/py";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { standardFieldProps } from "@web/views/fields/standard_field_props";
|
||||
@@ -38,7 +38,7 @@ export class BadgeField extends Component {
|
||||
|
||||
export const badgeField = {
|
||||
component: BadgeField,
|
||||
displayName: _lt("Badge"),
|
||||
displayName: _t("Badge"),
|
||||
supportedTypes: ["selection", "many2one", "char"],
|
||||
extractProps: ({ decorations }) => {
|
||||
return { decorations };
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useSpecialData } from "@web/views/fields/relational_utils";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
@@ -80,7 +80,7 @@ export class BadgeSelectionField extends Component {
|
||||
|
||||
export const badgeSelectionField = {
|
||||
component: BadgeSelectionField,
|
||||
displayName: _lt("Badges"),
|
||||
displayName: _t("Badges"),
|
||||
supportedTypes: ["many2one", "selection"],
|
||||
isEmpty: (record, fieldName) => record.data[fieldName] === false,
|
||||
extractProps: (fieldInfo, dynamicInfo) => ({
|
||||
|
||||
@@ -6,7 +6,7 @@ import { isBinarySize } from "@web/core/utils/binary";
|
||||
import { download } from "@web/core/network/download";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { FileUploader } from "../file_handler";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
export class BinaryField extends Component {
|
||||
@@ -73,10 +73,10 @@ export const listBinaryField = {
|
||||
|
||||
export const binaryField = {
|
||||
component: BinaryField,
|
||||
displayName: _lt("File"),
|
||||
displayName: _t("File"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Accepted file extensions"),
|
||||
label: _t("Accepted file extensions"),
|
||||
name: "accepted_file_extensions",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { CheckBox } from "@web/core/checkbox/checkbox";
|
||||
|
||||
@@ -24,7 +24,7 @@ export class BooleanField extends Component {
|
||||
|
||||
export const booleanField = {
|
||||
component: BooleanField,
|
||||
displayName: _lt("Checkbox"),
|
||||
displayName: _t("Checkbox"),
|
||||
supportedTypes: ["boolean"],
|
||||
isEmpty: () => false,
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { archParseBoolean } from "@web/views/utils";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
@@ -28,7 +28,7 @@ export class BooleanFavoriteField extends Component {
|
||||
|
||||
export const booleanFavoriteField = {
|
||||
component: BooleanFavoriteField,
|
||||
displayName: _lt("Favorite"),
|
||||
displayName: _t("Favorite"),
|
||||
supportedTypes: ["boolean"],
|
||||
isEmpty: () => false,
|
||||
extractProps: ({ attrs, options }) => ({
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
|
||||
export class BooleanIconField extends Component {
|
||||
@@ -23,10 +23,10 @@ export class BooleanIconField extends Component {
|
||||
|
||||
export const booleanIconField = {
|
||||
component: BooleanIconField,
|
||||
displayName: _lt("Boolean Icon"),
|
||||
displayName: _t("Boolean Icon"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Icon"),
|
||||
label: _t("Icon"),
|
||||
name: "icon",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { booleanField, BooleanField } from "../boolean/boolean_field";
|
||||
|
||||
@@ -22,7 +22,7 @@ export class BooleanToggleField extends BooleanField {
|
||||
export const booleanToggleField = {
|
||||
...booleanField,
|
||||
component: BooleanToggleField,
|
||||
displayName: _lt("Toggle"),
|
||||
displayName: _t("Toggle"),
|
||||
extractProps({ options }, dynamicInfo) {
|
||||
return {
|
||||
autosave: "autosave" in options ? Boolean(options.autosave) : true,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { archParseBoolean } from "@web/views/utils";
|
||||
import { formatChar } from "../formatters";
|
||||
@@ -66,7 +66,7 @@ export class CharField extends Component {
|
||||
|
||||
export const charField = {
|
||||
component: CharField,
|
||||
displayName: _lt("Text"),
|
||||
displayName: _t("Text"),
|
||||
supportedTypes: ["char"],
|
||||
extractProps: ({ attrs, options }) => ({
|
||||
isPassword: archParseBoolean(attrs.password),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { evalDomain } from "@web/core/domain";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { evaluateExpr } from "@web/core/py_js/py";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { omit } from "@web/core/utils/objects";
|
||||
@@ -78,7 +78,7 @@ function extractProps({ attrs }) {
|
||||
|
||||
export const copyClipboardButtonField = {
|
||||
component: CopyClipboardButtonField,
|
||||
displayName: _lt("Copy to Clipboard"),
|
||||
displayName: _t("Copy to Clipboard"),
|
||||
extractProps,
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ registry.category("fields").add("CopyClipboardButton", copyClipboardButtonField)
|
||||
|
||||
export const copyClipboardCharField = {
|
||||
component: CopyClipboardCharField,
|
||||
displayName: _lt("Copy Text to Clipboard"),
|
||||
displayName: _t("Copy Text to Clipboard"),
|
||||
supportedTypes: ["char"],
|
||||
extractProps,
|
||||
};
|
||||
@@ -95,7 +95,7 @@ registry.category("fields").add("CopyClipboardChar", copyClipboardCharField);
|
||||
|
||||
export const copyClipboardTextField = {
|
||||
component: CopyClipboardTextField,
|
||||
displayName: _lt("Copy Multiline Text to Clipboard"),
|
||||
displayName: _t("Copy Multiline Text to Clipboard"),
|
||||
supportedTypes: ["text"],
|
||||
extractProps,
|
||||
};
|
||||
@@ -104,7 +104,7 @@ registry.category("fields").add("CopyClipboardText", copyClipboardTextField);
|
||||
|
||||
export const copyClipboardURLField = {
|
||||
component: CopyClipboardURLField,
|
||||
displayName: _lt("Copy URL to Clipboard"),
|
||||
displayName: _t("Copy URL to Clipboard"),
|
||||
supportedTypes: ["char"],
|
||||
extractProps,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
formatDateTime,
|
||||
today,
|
||||
} from "@web/core/l10n/dates";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { ensureArray } from "@web/core/utils/arrays";
|
||||
import { archParseBoolean } from "@web/views/utils";
|
||||
@@ -245,25 +245,25 @@ const END_DATE_FIELD_OPTION = "end_date_field";
|
||||
|
||||
export const dateField = {
|
||||
component: DateTimeField,
|
||||
displayName: _lt("Date"),
|
||||
displayName: _t("Date"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Earliest accepted date"),
|
||||
label: _t("Earliest accepted date"),
|
||||
name: "min_date",
|
||||
type: "string",
|
||||
help: _lt(`ISO-formatted date (e.g. "2018-12-31") or "today".`),
|
||||
help: _t(`ISO-formatted date (e.g. "2018-12-31") or "today".`),
|
||||
},
|
||||
{
|
||||
label: _lt("Latest accepted date"),
|
||||
label: _t("Latest accepted date"),
|
||||
name: "max_date",
|
||||
type: "string",
|
||||
help: _lt(`ISO-formatted date (e.g. "2018-12-31") or "today".`),
|
||||
help: _t(`ISO-formatted date (e.g. "2018-12-31") or "today".`),
|
||||
},
|
||||
{
|
||||
label: _lt("Warning for future dates"),
|
||||
label: _t("Warning for future dates"),
|
||||
name: "warn_future",
|
||||
type: "boolean",
|
||||
help: _lt(`Displays a warning icon if the input dates are in the future.`),
|
||||
help: _t(`Displays a warning icon if the input dates are in the future.`),
|
||||
},
|
||||
],
|
||||
supportedTypes: ["date"],
|
||||
@@ -295,15 +295,15 @@ export const dateField = {
|
||||
|
||||
export const dateTimeField = {
|
||||
...dateField,
|
||||
displayName: _lt("Date & Time"),
|
||||
displayName: _t("Date & Time"),
|
||||
supportedOptions: [
|
||||
...dateField.supportedOptions,
|
||||
{
|
||||
label: _lt("Rounding"),
|
||||
label: _t("Rounding"),
|
||||
name: "rounding",
|
||||
type: "number",
|
||||
default: 5,
|
||||
help: _lt(`Increment used in the minutes selection dropdown.`),
|
||||
help: _t(`Increment used in the minutes selection dropdown.`),
|
||||
},
|
||||
],
|
||||
supportedTypes: ["datetime"],
|
||||
@@ -311,17 +311,17 @@ export const dateTimeField = {
|
||||
|
||||
export const dateRangeField = {
|
||||
...dateTimeField,
|
||||
displayName: _lt("Date Range"),
|
||||
displayName: _t("Date Range"),
|
||||
supportedOptions: [
|
||||
...dateTimeField.supportedOptions,
|
||||
{
|
||||
label: _lt("Start date field"),
|
||||
label: _t("Start date field"),
|
||||
name: START_DATE_FIELD_OPTION,
|
||||
type: "field",
|
||||
availableTypes: ["date", "datetime"],
|
||||
},
|
||||
{
|
||||
label: _lt("End date field"),
|
||||
label: _t("End date field"),
|
||||
name: END_DATE_FIELD_OPTION,
|
||||
type: "field",
|
||||
availableTypes: ["date", "datetime"],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { Component, onWillStart, onWillUpdateProps, useState } from "@odoo/owl";
|
||||
import { Domain, InvalidDomainError } from "@web/core/domain";
|
||||
import { DomainSelector } from "@web/core/domain_selector/domain_selector";
|
||||
@@ -240,15 +240,15 @@ export class DomainField extends Component {
|
||||
|
||||
export const domainField = {
|
||||
component: DomainField,
|
||||
displayName: _lt("Domain"),
|
||||
displayName: _t("Domain"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Edit in dialog"),
|
||||
label: _t("Edit in dialog"),
|
||||
name: "in_dialog",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("Model"),
|
||||
label: _t("Model"),
|
||||
name: "model",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { useInputField } from "../input_field_hook";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
|
||||
@@ -21,7 +21,7 @@ export class EmailField extends Component {
|
||||
|
||||
export const emailField = {
|
||||
component: EmailField,
|
||||
displayName: _lt("Email"),
|
||||
displayName: _t("Email"),
|
||||
supportedTypes: ["char"],
|
||||
extractProps: ({ attrs }) => ({
|
||||
placeholder: attrs.placeholder,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useInputField } from "../input_field_hook";
|
||||
import { useNumpadDecimal } from "../numpad_decimal_hook";
|
||||
@@ -59,27 +59,27 @@ export class FloatField extends Component {
|
||||
|
||||
export const floatField = {
|
||||
component: FloatField,
|
||||
displayName: _lt("Float"),
|
||||
displayName: _t("Float"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Format number"),
|
||||
label: _t("Format number"),
|
||||
name: "enable_formatting",
|
||||
type: "boolean",
|
||||
help: _lt("Format the value according to your language setup - e.g. thousand separators, rounding, etc."),
|
||||
help: _t("Format the value according to your language setup - e.g. thousand separators, rounding, etc."),
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
label: _lt("Digits"),
|
||||
label: _t("Digits"),
|
||||
name: "digits",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Type"),
|
||||
label: _t("Type"),
|
||||
name: "type",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Step"),
|
||||
label: _t("Step"),
|
||||
name: "step",
|
||||
type: "number",
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { floatField, FloatField } from "../float/float_field";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
|
||||
export class FloatFactorField extends FloatField {
|
||||
static props = {
|
||||
@@ -33,7 +33,7 @@ export const floatFactorField = {
|
||||
supportedOptions: [
|
||||
...floatField.supportedOptions,
|
||||
{
|
||||
label: _lt("Factor"),
|
||||
label: _t("Factor"),
|
||||
name: "factor",
|
||||
type: "number",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { formatFloatTime } from "../formatters";
|
||||
import { parseFloatTime } from "../parsers";
|
||||
@@ -40,10 +40,10 @@ export class FloatTimeField extends Component {
|
||||
|
||||
export const floatTimeField = {
|
||||
component: FloatTimeField,
|
||||
displayName: _lt("Time"),
|
||||
displayName: _t("Time"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Type"),
|
||||
label: _t("Type"),
|
||||
name: "type",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { formatFloatFactor } from "../formatters";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
@@ -58,27 +58,27 @@ export const floatToggleField = {
|
||||
component: FloatToggleField,
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Digits"),
|
||||
label: _t("Digits"),
|
||||
name: "digits",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Type"),
|
||||
label: _t("Type"),
|
||||
name: "type",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Range"),
|
||||
label: _t("Range"),
|
||||
name: "range",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Factor"),
|
||||
label: _t("Factor"),
|
||||
name: "factor",
|
||||
type: "number",
|
||||
},
|
||||
{
|
||||
label: _lt("Disable readonly"),
|
||||
label: _t("Disable readonly"),
|
||||
name: "force_button",
|
||||
type: "boolean",
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { formatSelection } from "../formatters";
|
||||
|
||||
@@ -41,7 +41,7 @@ export class FontSelectionField extends Component {
|
||||
|
||||
export const fontSelectionField = {
|
||||
component: FontSelectionField,
|
||||
displayName: _lt("Font Selection"),
|
||||
displayName: _t("Font Selection"),
|
||||
supportedTypes: ["selection"],
|
||||
extractProps({ attrs }, dynamicInfo) {
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt, _t } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { loadJS } from "@web/core/assets";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { formatFloat } from "@web/views/fields/formatters";
|
||||
@@ -99,12 +99,12 @@ export const gaugeField = {
|
||||
component: GaugeField,
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Title"),
|
||||
label: _t("Title"),
|
||||
name: "title",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Max value field"),
|
||||
label: _t("Max value field"),
|
||||
name: "max_value",
|
||||
type: "field",
|
||||
availableTypes: ["integer", "float"],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
|
||||
import { Component } from "@odoo/owl";
|
||||
@@ -15,7 +15,7 @@ export class HandleField extends Component {
|
||||
|
||||
export const handleField = {
|
||||
component: HandleField,
|
||||
displayName: _lt("Handle"),
|
||||
displayName: _t("Handle"),
|
||||
supportedTypes: ["integer"],
|
||||
isEmpty: () => false,
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { Component, useEffect, useRef } from "@odoo/owl";
|
||||
|
||||
@@ -38,7 +38,7 @@ export class IframeWrapperField extends Component {
|
||||
|
||||
export const iframeWrapperField = {
|
||||
component: IframeWrapperField,
|
||||
displayName: _lt("Wrap raw html within an iframe"),
|
||||
displayName: _t("Wrap raw html within an iframe"),
|
||||
// If HTML, don't forget to adjust the sanitize options to avoid stripping most of the metadata
|
||||
supportedTypes: ["text", "html"],
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { isMobileOS } from "@web/core/browser/feature_detection";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { url } from "@web/core/utils/urls";
|
||||
@@ -183,36 +183,36 @@ export class ImageField extends Component {
|
||||
|
||||
export const imageField = {
|
||||
component: ImageField,
|
||||
displayName: _lt("Image"),
|
||||
displayName: _t("Image"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Enable zoom"),
|
||||
label: _t("Enable zoom"),
|
||||
name: "zoom",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("Zoom delay"),
|
||||
label: _t("Zoom delay"),
|
||||
name: "zoom_delay",
|
||||
type: "number",
|
||||
help: _lt("Delay the apparition of the zoomed image with a value in milliseconds"),
|
||||
help: _t("Delay the apparition of the zoomed image with a value in milliseconds"),
|
||||
},
|
||||
{
|
||||
label: _lt("Accepted file extensions"),
|
||||
label: _t("Accepted file extensions"),
|
||||
name: "accepted_file_extensions",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Size"),
|
||||
label: _t("Size"),
|
||||
name: "size",
|
||||
type: "selection",
|
||||
choices: [
|
||||
{ label: _lt("Small"), value: "[0,90]" },
|
||||
{ label: _lt("Medium"), value: "[0,180]" },
|
||||
{ label: _lt("Large"), value: "[0,270]" },
|
||||
{ label: _t("Small"), value: "[0,90]" },
|
||||
{ label: _t("Medium"), value: "[0,180]" },
|
||||
{ label: _t("Large"), value: "[0,270]" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: _lt("Preview image"),
|
||||
label: _t("Preview image"),
|
||||
name: "preview_image",
|
||||
type: "field",
|
||||
availableTypes: ["binary"],
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
|
||||
import { Component, onWillUpdateProps, useState } from "@odoo/owl";
|
||||
@@ -51,16 +51,16 @@ export class ImageUrlField extends Component {
|
||||
|
||||
export const imageUrlField = {
|
||||
component: ImageUrlField,
|
||||
displayName: _lt("Image"),
|
||||
displayName: _t("Image"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Size"),
|
||||
label: _t("Size"),
|
||||
name: "size",
|
||||
type: "selection",
|
||||
choices: [
|
||||
{ label: _lt("Small"), value: "[0,90]" },
|
||||
{ label: _lt("Medium"), value: "[0,180]" },
|
||||
{ label: _lt("Large"), value: "[0,270]" },
|
||||
{ label: _t("Small"), value: "[0,90]" },
|
||||
{ label: _t("Medium"), value: "[0,180]" },
|
||||
{ label: _t("Large"), value: "[0,270]" },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { formatInteger } from "../formatters";
|
||||
import { parseInteger } from "../parsers";
|
||||
@@ -46,22 +46,22 @@ export class IntegerField extends Component {
|
||||
|
||||
export const integerField = {
|
||||
component: IntegerField,
|
||||
displayName: _lt("Integer"),
|
||||
displayName: _t("Integer"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Format number"),
|
||||
label: _t("Format number"),
|
||||
name: "enable_formatting",
|
||||
type: "boolean",
|
||||
help: _lt("Format the value according to your language setup - e.g. thousand separators, rounding, etc."),
|
||||
help: _t("Format the value according to your language setup - e.g. thousand separators, rounding, etc."),
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
label: _lt("Type"),
|
||||
label: _t("Type"),
|
||||
name: "type",
|
||||
type: "string",
|
||||
},
|
||||
{
|
||||
label: _lt("Step"),
|
||||
label: _t("Step"),
|
||||
name: "step",
|
||||
type: "number",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
|
||||
@@ -19,7 +19,7 @@ export class JsonField extends Component {
|
||||
|
||||
export const jsonField = {
|
||||
component: JsonField,
|
||||
displayName: _lt("Json"),
|
||||
displayName: _t("Json"),
|
||||
supportedTypes: ["jsonb"],
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { registry } from "@web/core/registry";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
import { formatSelection } from "../formatters";
|
||||
|
||||
@@ -29,7 +29,7 @@ export class LabelSelectionField extends Component {
|
||||
|
||||
export const labelSelectionField = {
|
||||
component: LabelSelectionField,
|
||||
displayName: _lt("Label Selection"),
|
||||
displayName: _t("Label Selection"),
|
||||
supportedTypes: ["selection"],
|
||||
extractProps: ({ options }) => ({
|
||||
classesObj: options.classes,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { standardFieldProps } from "../standard_field_props";
|
||||
@@ -70,7 +70,7 @@ export const many2ManyBinaryField = {
|
||||
component: Many2ManyBinaryField,
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Accepted file extensions"),
|
||||
label: _t("Accepted file extensions"),
|
||||
name: "accepted_file_extensions",
|
||||
type: "string",
|
||||
},
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
import { Component, onWillUnmount } from "@odoo/owl";
|
||||
import { CheckBox } from "@web/core/checkbox/checkbox";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useBus } from "@web/core/utils/hooks";
|
||||
import { debounce } from "@web/core/utils/timing";
|
||||
@@ -76,7 +76,7 @@ export class Many2ManyCheckboxesField extends Component {
|
||||
|
||||
export const many2ManyCheckboxesField = {
|
||||
component: Many2ManyCheckboxesField,
|
||||
displayName: _lt("Checkboxes"),
|
||||
displayName: _t("Checkboxes"),
|
||||
supportedTypes: ["many2many"],
|
||||
isEmpty: () => false,
|
||||
extractProps(fieldInfo, dynamicInfo) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { CheckBox } from "@web/core/checkbox/checkbox";
|
||||
import { ColorList } from "@web/core/colorlist/colorlist";
|
||||
import { Domain } from "@web/core/domain";
|
||||
@@ -257,15 +257,15 @@ export class Many2ManyTagsField extends Component {
|
||||
|
||||
export const many2ManyTagsField = {
|
||||
component: Many2ManyTagsField,
|
||||
displayName: _lt("Tags"),
|
||||
displayName: _t("Tags"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Disable creation"),
|
||||
label: _t("Disable creation"),
|
||||
name: "no_create",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("Use colors"),
|
||||
label: _t("Use colors"),
|
||||
name: "color_field",
|
||||
type: "boolean",
|
||||
},
|
||||
@@ -375,7 +375,7 @@ export const many2ManyTagsFieldColorEditable = {
|
||||
supportedOptions: [
|
||||
...many2ManyTagsField.supportedOptions,
|
||||
{
|
||||
label: _lt("Prevent color edition"),
|
||||
label: _t("Prevent color edition"),
|
||||
name: "no_edit_color",
|
||||
type: "boolean",
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ import { browser } from "@web/core/browser/browser";
|
||||
import { isMobileOS } from "@web/core/browser/feature_detection";
|
||||
import { makeContext } from "@web/core/context";
|
||||
import { Dialog } from "@web/core/dialog/dialog";
|
||||
import { _lt } from "@web/core/l10n/translation";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { evaluateExpr } from "@web/core/py_js/py";
|
||||
import { registry } from "@web/core/registry";
|
||||
import { useChildRef, useOwnedDialogs, useService } from "@web/core/utils/hooks";
|
||||
@@ -313,25 +313,25 @@ export class Many2OneField extends Component {
|
||||
|
||||
export const many2OneField = {
|
||||
component: Many2OneField,
|
||||
displayName: _lt("Many2one"),
|
||||
displayName: _t("Many2one"),
|
||||
supportedOptions: [
|
||||
{
|
||||
label: _lt("Disable creation"),
|
||||
label: _t("Disable creation"),
|
||||
name: "no_create",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("Disable opening"),
|
||||
label: _t("Disable opening"),
|
||||
name: "no_opening",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("No quick create"),
|
||||
label: _t("No quick create"),
|
||||
name: "no_quick_create",
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
label: _lt("No create edit"),
|
||||
label: _t("No create edit"),
|
||||
name: "no_create_edit",
|
||||
type: "boolean",
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user