تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
705 أدوات العرض

Hello,

I am interested in translation of odoo, but I am getting technical error during process. So I am on page "Translated Terms", I have exported all translation then modified in excel and then converted to CSV and uploaded by "favourites" -> "import record" and finally getting error below:


duplicate key value violates unique constraint "ir_translation_code_unique" DETAIL: Key (type, lang, md5(src))=(code, tr_TR, 1ae788f62bdafc2806af4a6047cb7f49) already exists. at row 2 (addons/base/models/res_config.py)

error gets repeated on all lines or most of lines. Even without changing file upload returns this error. why is there are dublicates in exported file so it is not accepting same file as import for overwriteing terms :S



Regards,
Turkel.


الصورة الرمزية
إهمال
أفضل إجابة

The error message you are seeing is indicating that there is already a translation for some of the terms you are trying to import in the language "tr_TR" and with the same source text. This is likely because the terms you are trying to import have already been translated in the past.

To resolve this issue, you can try one of the following options:

  1. Manually edit the CSV file and remove the duplicate rows before importing.

  2. Use the option "Overwrite existing translations" when importing the CSV file. This will replace the existing translations with the new ones in the file.

  3. You can also try to filter the exported file and only import the missing translations from the exported file.

  4. Another approach would be to change the translation type from "code" to "model" (in the exported CSV file) so it will work with the "model" translation type and not conflict with the existing "code" translations.

Please keep in mind that if you choose to overwrite existing translations, it will replace the previous translations with the new ones in the file, so be careful when doing this.

الصورة الرمزية
إهمال