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

Include list of skipped results of component discovery #10515

Closed
2 tasks done
lluisoxigen opened this issue Nov 30, 2023 · 6 comments · Fixed by #10652
Closed
2 tasks done

Include list of skipped results of component discovery #10515

lluisoxigen opened this issue Nov 30, 2023 · 6 comments · Fixed by #10652
Assignees
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Milestone

Comments

@lluisoxigen
Copy link

Describe the issue

New docker weblate installation with version 5.2.1. Add Component works correctly. But on saving Component discovery, it shows "No matching components were found!". In the same path, it should have to discover 30 files more.

The setup is the following:

Regular expression to match translation files against
web_areapersonal_companyname/Resources/Views/Empleado/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.resx

File format
.NET resource file

Customize the component name
{{ component }}

Define the monolingual base filename
web_areapersonal_companyname/Resources/Views/Empleado/{{ component }}.resx

Language filter
^[^.]+$

File mask
web_areapersonal_companyname/Resources/Views/Empleado/EmpleadoBandeja.*.resx

Monolingual base language file
web_areapersonal_companyname/Resources/Views/Empleado/EmpleadoBandeja.ca.resx

Gitlab repository file examples
https://gitlab.companyname.com/informatica/test_weblate/-/blob/develop/web_areapersonal_companyname/Resources/Views/Empleado/EmpleadoBandeja.ca.resx
https://gitlab.companyname.com/informatica/test_weblate/-/blob/develop/web_areapersonal_companyname/Resources/Views/Empleado/EmpleadoPerfil.ca.resx

I already tried

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

Steps to reproduce the behavior

No response

Expected behavior

No response

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

Docker container

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Nov 30, 2023

Define the monolingual base filename web_areapersonal_companyname/Resources/Views/Empleado/{{ component }}.resx

It is missing .ca, I guess the file without a language code doesn't exist.

Monolingual base language file web_areapersonal_companyname/Resources/Views/Empleado/EmpleadoBandeja.ca.resx

@nijel nijel added the question This is more a question for the support than an issue. label Nov 30, 2023
Copy link

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

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

@lluisoxigen
Copy link
Author

Hi nijel! You are right. Now it works as it is expected and all files are detected. Thank you very much. It would be nice if the web would inform on which field the error is.

I leave my final setup in case it can hep someone else:

Regular expression to match translation files against
(?P<originalHierarchy>.*/Resources)/(?P<folders>.*)/(?P<component>[^/]*)\.(?P<language>[^/.]*)\.resx

File format
.NET resource file

Customize the component name
{{ folders }}: {{ component }}

Define the monolingual base filename
{{ originalHierarchy }}/{{ folders }}/{{ component }}.ca.resx

@nijel nijel changed the title No matching components on component discovery Include list of skipped results of component discovery Dec 14, 2023
@nijel nijel added enhancement Adding or requesting a new feature. and removed question This is more a question for the support than an issue. labels Dec 14, 2023
@nijel nijel added this to the 5.4 milestone Dec 14, 2023
@nijel
Copy link
Member

nijel commented Dec 14, 2023

Thanks for the suggestion, adding a list of skipped entries with a reason would be useful for debugging issues like this. ComponentDiscovery.check_valid would return an invalidity reason and ComponentDiscovery.perform would return an additional list of skipped entries.

@nijel nijel added hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. labels Dec 14, 2023
Copy link

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

@nijel nijel self-assigned this Dec 18, 2023
nijel added a commit to nijel/weblate that referenced this issue Dec 18, 2023
This makes it more obvious why certain components could not be created.

Fixes WeblateOrg#10515
nijel added a commit to nijel/weblate that referenced this issue Dec 18, 2023
This makes it more obvious why certain components could not be created.

Fixes WeblateOrg#10515
nijel added a commit that referenced this issue Dec 18, 2023
This makes it more obvious why certain components could not be created.

Fixes #10515
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. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants