Initial commit: Core packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:45 +02:00
commit 12c29a983b
9512 changed files with 8379910 additions and 0 deletions

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-inherit="web.TranslationDialog" t-inherit-mode="extension">
<xpath expr="//div[hasclass('row')]/div/t" position="after">
<a t-if="term.transifex_url" t-attf-href="#{term.transifex_url}" title="Contribute" target="_blank"> <i class="fa fa-globe"/></a>
</xpath>
</t>
</templates>

View file

@ -0,0 +1,25 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { ListController } from "@web/views/list/list_controller";
import { listView } from "@web/views/list/list_view";
import { browser } from "@web/core/browser/browser";
import { useService } from "@web/core/utils/hooks";
export class TransifexCodeTranslationListController extends ListController {
setup() {
super.setup();
this.orm = useService("orm");
}
async onClickReloadCodeTranslations() {
await this.orm.call("transifex.code.translation", "reload", [], {});
browser.location.reload();
}
}
registry.category("views").add("transifex_code_translation_tree", {
...listView,
Controller: TransifexCodeTranslationListController,
buttonTemplate: "transifex.CodeTranslationListView.Buttons",
});

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="transifex.CodeTranslationListView.Buttons" t-inherit="web.ListView.Buttons" t-inherit-mode="primary" owl="1">
<!-- Before the export button -->
<xpath expr="//t[contains(@t-if, 'isExportEnable')]" position="before">
<button type="button" class="btn btn-primary" t-on-click="onClickReloadCodeTranslations">Reload</button>
</xpath>
</t>
</templates>