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

Changes to settigns blocked by Weblate due to error in unmodified "file mask" setting #7312

Closed
2 tasks done
TobiGr opened this issue Feb 25, 2022 · 7 comments
Closed
2 tasks done
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@TobiGr
Copy link

TobiGr commented Feb 25, 2022

Describe the issue

I tried to modify a few entries in the "Files" settings in NewPipe/Strings. However, Weblate rejects the changes to whatever setting I modify and displays this message although it was not modified below the "File mask" entry:

There is more than one file for Chinese (Simplified) language, please adjust the file mask and use components for translating different resources.

Path of files to translate relative to repository root, use * instead of language code, for example: po/.po or locale//LC_MESSAGES/django.po.

This error blocks me from changing any setting, although the "File mask" setting was not touched at all.

The content of the "file mask" setting is app/src/main/res/values-*/strings.xml which is the standard format for Android resource strings. The following Chinese resource directories are in our repository.

values-zh-rCN [Chinese (Simplefied)]
values-zh-rHK [Chinese (Honkong)]
values-zh-rTW [Chinese (Traditional)]

All three are correctly identified by Weblate and translatable via the web app.
I do not know what to change to be able to modify other settings.
As a side note: It might be better to not block all changes when there is an error with another setting.

I already tried

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

Steps to reproduce the behavior

That's the way the problem occoured in NewPipe:

  1. Create a traanslation component for Android resource strings (file mask like res/values-*/strings.xml)
  2. Add threse three languages (I cannot say whether they were added manually or via the web interface)
    values-zh-rCN [Chinese (Simplefied)]
    values-zh-rHK [Chinese (Honkong)]
    values-zh-rTW [Chinese (Traditional)]
  3. go to the component's settings > files and try to modify any setting.

Expected behavior

a) Weblate recognises that the file mask field has not been modified and thus allows me to make changes to other settings
b) Weblate does not throw an error at all

Screenshots

grafik

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

Hosted weblate is used at version 4.11.1-dev

Weblate deploy checks

cannot obtain, because https://hosted.weblate.org/ is used

Additional context

No response

@nijel
Copy link
Member

nijel commented Feb 25, 2022

There is most likely additional file in the repository....

@Geeyun-JY3
Copy link
Collaborator

Geeyun-JY3 commented Feb 25, 2022

Actually there are two files for Chinese (Simplified) in NewPipe repository, as I reported in TeamNewPipe/NewPipe#6469 (comment):

  1. https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values-b%2Bzh%2BHANS%2BCN/strings.xml
  2. https://github.com/TeamNewPipe/NewPipe/blob/dev/app/src/main/res/values-zh-rCN/strings.xml

And BTW, the Chinese (Simplified) translation from Weblate would only push to the first file now.

Not sure if it is related.

@nijel
Copy link
Member

nijel commented Feb 25, 2022

@nijel nijel added the question This is more a question for the support than an issue. label Feb 25, 2022
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

@github-actions
Copy link

github-actions bot commented Mar 8, 2022

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

@triallax
Copy link
Contributor

And BTW, the Chinese (Simplified) translation from Weblate would only push to the first file now.

Is there any way to force Weblate to push changes to zh-rCN instead of b+zh+HANS+CN? See TeamNewPipe/NewPipe#6469 and TeamNewPipe/NewPipe#8549 (comment).

@nijel
Copy link
Member

nijel commented Jun 28, 2022

Weblate does not rename files, it keeps whatever you have in the repository. The only time when Weblate logic comes into play is when creating new translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.
Projects
None yet
Development

No branches or pull requests

4 participants