From 92d3da3e6938350f9ff02d901c22d878ac5c2060 Mon Sep 17 00:00:00 2001 From: devendra1973 Date: Tue, 11 Nov 2025 15:53:08 +0530 Subject: [PATCH 1/2] feat(translations): add AI translation wizard (initial scaffold) #767 --- openspp_translations/__init__.py | 0 openspp_translations/__manifest__.py | 11 +++++++ openspp_translations/models/__init__.py | 1 + .../models/translation_wizard.py | 13 ++++++++ .../views/translation_wizard_view.xml | 30 +++++++++++++++++++ 5 files changed, 55 insertions(+) create mode 100644 openspp_translations/__init__.py create mode 100644 openspp_translations/__manifest__.py create mode 100644 openspp_translations/models/__init__.py create mode 100644 openspp_translations/models/translation_wizard.py create mode 100644 openspp_translations/views/translation_wizard_view.xml diff --git a/openspp_translations/__init__.py b/openspp_translations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/openspp_translations/__manifest__.py b/openspp_translations/__manifest__.py new file mode 100644 index 000000000..83bef60c8 --- /dev/null +++ b/openspp_translations/__manifest__.py @@ -0,0 +1,11 @@ +{ + 'name': 'OpenSPP Translations', + 'version': '1.0', + 'summary': 'AI-assisted translation tool for OpenSPP', + 'depends': ['base'], + 'data': [ + 'views/translation_wizard_view.xml', + ], + 'installable': True, + 'application': False, +} diff --git a/openspp_translations/models/__init__.py b/openspp_translations/models/__init__.py new file mode 100644 index 000000000..e820c95a4 --- /dev/null +++ b/openspp_translations/models/__init__.py @@ -0,0 +1 @@ +from . import translation_wizard diff --git a/openspp_translations/models/translation_wizard.py b/openspp_translations/models/translation_wizard.py new file mode 100644 index 000000000..449842c8d --- /dev/null +++ b/openspp_translations/models/translation_wizard.py @@ -0,0 +1,13 @@ +from odoo import models, fields, api + +class TranslationWizard(models.TransientModel): + _name = 'translation.wizard' + _description = 'AI-Assisted Translation Wizard' + + source_text = fields.Text("Source Text", required=True) + translated_text = fields.Text("Translated Text") + + @api.model + def translate_text(self): + # Simple placeholder logic (we fake translation for now) + self.translated_text = f"TRANSLATED: {self.source_text}" diff --git a/openspp_translations/views/translation_wizard_view.xml b/openspp_translations/views/translation_wizard_view.xml new file mode 100644 index 000000000..4b51bc68c --- /dev/null +++ b/openspp_translations/views/translation_wizard_view.xml @@ -0,0 +1,30 @@ + + + translation.wizard.form + translation.wizard + +
+ + + + +
+
+
+
+
+ + + AI Translate + translation.wizard + form + new + + + + +
+o + From 72330720498c8ff0b09d4114865c1c4160f1d5b9 Mon Sep 17 00:00:00 2001 From: devendra1973 Date: Tue, 11 Nov 2025 16:09:03 +0530 Subject: [PATCH 2/2] docs(translations): add README and metadata cleanup --- openspp_translations/README.md | 9 +++++++++ openspp_translations/__manifest__.py | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 openspp_translations/README.md diff --git a/openspp_translations/README.md b/openspp_translations/README.md new file mode 100644 index 000000000..12920961c --- /dev/null +++ b/openspp_translations/README.md @@ -0,0 +1,9 @@ +# OpenSPP Translations (AI Assisted Translation Wizard) + +This module introduces a basic translation wizard that allows users to input +source text and generate translated output (stub implementation for now). +A follow-up iteration will integrate real translation providers. + +- Wizard model: `translation.wizard` +- View: Form and menu entry under "Translations" +- Status: Scaffolding ready, awaiting integration with external providers. diff --git a/openspp_translations/__manifest__.py b/openspp_translations/__manifest__.py index 83bef60c8..1e053664d 100644 --- a/openspp_translations/__manifest__.py +++ b/openspp_translations/__manifest__.py @@ -9,3 +9,8 @@ 'installable': True, 'application': False, } + + +'license': 'LGPL-3', +'author': 'Devendra Chauhan', +'website': 'https://github.com/devendra1973',