Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusing a file between components #13259

Closed
2 tasks done
dxdx123 opened this issue Dec 12, 2024 · 7 comments · Fixed by #13302
Closed
2 tasks done

Reusing a file between components #13259

dxdx123 opened this issue Dec 12, 2024 · 7 comments · Fixed by #13302
Assignees
Labels
enhancement Adding or requesting a new feature.
Milestone

Comments

@dxdx123
Copy link

dxdx123 commented Dec 12, 2024

Describe the issue

There are two components.
Component 1: game_text_cn, source language: Chinese, translating Chinese to English.
Component 2: game_text_en, source language: English (en.xliff from Component 1), translating English to other languages.
The source code repository of Component 2 uses the shared repository weblate://dev/game_text_cn.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

Reproduction Steps:
Suppose there are 10 source texts in Component 1. When adding and saving a new translation entry (translated to English) in Component 1, Component 2 continues to show only 10 source texts. This issue persists unless the repository is reset in the management interface.

Expected behavior

image

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

weblate 5.5.5 in docker

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Dec 12, 2024

Likely a bug because using the same file in multiple components was not really expected.

You might want to use intermediate language instead and have only one component, see https://docs.weblate.org/en/latest/workflows.html#quality-gateway-for-the-source-strings.

@dxdx123
Copy link
Author

dxdx123 commented Dec 13, 2024

If I use an intermediate language, do I still need to create two components?

@nijel
Copy link
Member

nijel commented Dec 13, 2024

No

@dxdx123
Copy link
Author

dxdx123 commented Dec 16, 2024

May I ask, if it is one component, is it recommended to set the intermediate language file to the corresponding en.xliff for masking, or should a separate intermediate language file be specified?

@nijel nijel added this to the 5.9 milestone Dec 16, 2024
@nijel nijel added the enhancement Adding or requesting a new feature. label Dec 16, 2024
@nijel nijel self-assigned this Dec 16, 2024
nijel added a commit to nijel/weblate that referenced this issue Dec 16, 2024
Reusing filemask does not have to be the only issue, the very same issue
can happen when a signle file from one component is reused as source for
other component.

This also avoids special-casing this single alert and it now uses
generic alerts interface.

Fixes WeblateOrg#13259
@nijel nijel changed the title Is this a bug? Reusing a file between components Dec 16, 2024
@nijel
Copy link
Member

nijel commented Dec 16, 2024

It really depends on you whether you want to use English as an intermediate language directly.

#13302 will make Weblate alert on such setup so that it will be clear that something is configured wrongly.

Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

1 similar comment
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants