Пам’ять перекладів

Weblate постачається із вбудованою пам’яттю перекладів, яка складається з таких даних:

Вміст пам’яті перекладів можна застосувати до рядків кількома способами:

Для отримання підказок щодо встановлення, див. розділ Пам’ять перекладів Weblate, типово увімкнено.

Області дії пам’яті перекладів

Області дії пам’яті перекладів забезпечують конфіденційність для різних проєктів і користувачів. Також передбачено можливості зі спільного використання перекладів.

Імпортована пам’ять перекладів

Імпортування довільних даних пам’яті перекладів за допомогою команди import_memory робить вміст пам’яті перекладів доступним для всіх користувачів і проєктів.

Пам’ять перекладів окремого користувача

Зберігає усі переклади користувача автоматично до особистої пам’яті перекладів кожного користувача.

Значення за замовчуванням для нових користувачів автоматично коригується на основі конфігурації Автоматичне очищення пам’яті перекладів. Якщо автоматичне очищення увімкнено, ця функція за замовчуванням вимкнена, щоб запобігти повторному введенню невідповідних перекладів.

Пам’ять перекладів окремого проєкту

Усі переклади у проєкті автоматично зберігаються у пам’яті перекладів проєкту, яка буде доступною лише для цього проєкту.

Спільна памʼять перекладів

Усі переклади у проєктах, для яких увімкнено спільну пам’ять перекладів, зберігаються у спільній пам’яті перекладів, яка доступна для всіх проєктів.

Будь ласка, ретельно зважте, чи слід вмикати цю можливість для екземплярів Weblate, які є спільними для різних проєктів, оскільки вмикання може призвести до суттєвих наслідків:

  • Переклади може бути використано будь-ким.

  • Поширення перекладів може призвести до розкриття таємних відомостей.

  • Переконайтеся, що переклади, якими ви ділитеся, мають хорошу якість.

Стан памʼяті перекладу

Added in version 5.13.

Translation memory entries can have two different statuses: active and pending. Pending entries are included in suggestions, but with a quality penalty applied. If Автоматичне очищення пам’яті перекладів is enabled, matching pending entries are removed when a translation becomes active.

Автоматичне очищення пам’яті перекладів

Added in version 5.13.

When enabled for a project, Weblate replaces older automatically created translation memory entries when a translation becomes active:

  • With Увімкнути рецензії enabled, cleanup happens when the translation is approved.

  • Without review, cleanup happens as soon as the translation reaches the translated state.

For the same source string, component, context, and source/target language pair, Weblate removes matching non-file entries from translation memory, including entries with a different target text. This applies across personal, project, and shared translation memory scopes. The current translation is then stored again as an active entry in the scopes that are enabled for that change.

Entries imported from external translation memory files are not cleaned up automatically. Entries with a different context are kept.

У контейнері Docker це можна налаштувати за допомогою WEBLATE_DEFAULT_AUTOCLEAN_TM.

Примітка

Увімкнення автоматичного очищення також змінює стандартне значення для нових профілів користувачів, щоб вони не впливали на особисту пам’ять перекладів. Це запобігає повторному введенню невідповідних перекладів, які мали бути очищені.

Керування Пам’яттю перекладів

Інтерфейс користувача

Translation memory can be managed from several places in the Weblate UI:

  • Open the user menu and choose Translation memory to manage your personal translation memory.

  • Open a project and choose Translation memory from the project menu to manage translation memory for that project.

  • Open Administration and choose Translation memory to manage uploaded translation memory for the whole Weblate instance.

The translation memory page shows entry counts for the selected scope. Depending on the scope, it also lists entries by origin, component, or language pair. The listed entries can be downloaded as JSON or TMX. Users with the required permissions can delete entries, and the project view can rebuild translation memory for the whole project or for individual components from the current translations.

The project view also shows whether shared translation memory and autoclean translation memory are enabled for the project, with a link to the project workflow settings when the user can edit the project.

Translation memory files can be imported on the same page. Uploaded files are stored in the selected scope:

  • Personal uploads are available in your personal translation memory.

  • Project uploads are available in the selected project’s translation memory.

  • Administration uploads are available as uploaded shared entries for the whole Weblate instance.

Підказка

Translation memories in various formats can be imported into Weblate. The TMX format is provided for interoperability with other tools. All supported formats are TMX, JSON, XLIFF, PO, and CSV.

Source and target languages must be selected when uploading XLIFF, PO, or CSV files if the language information is not provided by the file itself.

Дивись також

Weblate Translation Memory Schema

../_images/memory.webp

You can search translation memory while editing strings from the Автоматичні пропозиції tab.

Інтерфейс адміністратора

Administrative users have additional translation memory management controls. In Administration > Translation memory, the page lists uploaded shared entries, shared entries, and total entries for the Weblate instance. Depending on permissions, it can import uploaded shared memory, delete uploaded entries, and download uploaded, shared, or all entries as JSON or TMX.

Added in version 4.12.

The project translation memory view also allows rebuilding parts of or the entire project translation memory. Existing entries for the selected component or project are deleted, and the memory is populated again from the current translations in the background.

Інтерфейс керування

Передбачено декілька команд керування для роботи із вмістом пам’яті перекладів. Ці команди працюють із усією пам’яттю перекладів, без фільтрування за областями (якщо це не вказано параметрами):

dump_memory

Експортує пам’ять до JSON

import_memory

Імпортує файли TMX або JSON до пам’яті перекладів

cleanup_memory

Видаляє всі записи зі статусом очікування з пам’яті перекладів

Added in version 4.14.

У програмному інтерфейсі Weblate передбачено роботу з пам’яттю перекладів. Це уможливлює автоматичну обробку для досягнення певних цілей або у відповідь на певні події у циклі перекладу.