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

Add component filtering based on key #11562

Open
LeoColman opened this issue May 3, 2024 · 3 comments
Open

Add component filtering based on key #11562

LeoColman opened this issue May 3, 2024 · 3 comments
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.

Comments

@LeoColman
Copy link
Contributor

Describe the problem

Even though I can

  • Set the string to read-only
  • Fastlane changelogs are lowest-priority shown to translators

I still have some problems I can't address:

  • Read-only strings won't allow translators willing to translate changelogs to do it, reducing overall translatability
  • Bundling both in the same component doesn't allow vision of true translation of the app -- Changelogs are not exactly part of the app and shouldn't count to the % translated of the language
  • Changelog files (if left write-enabled) taint translation percentage of more-valuable app details

Describe the solution you would like

I'm not sure what exactly to suggest, but the only thing I can think of is getting this screen:
image

and adding an exclusion (i.e. "Exclude files matching fastlane/metadata/android/changelogs/*") filter, which would mean filtering depending on key. It should probably behave similarly to how current Languages filter work.

Describe alternatives you have considered

  • Using the bulk edit addon

As explained above, this is more of a workaround than a final solution to the problem.

Screenshots

No response

Additional context

Initially discussed on

@nijel nijel added the enhancement Adding or requesting a new feature. label May 6, 2024
@nijel
Copy link
Member

nijel commented May 6, 2024

Just found out #8084, but closing that in favor of this as the description is way better here.

PS: #1993 might also be related.

@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 May 6, 2024
Copy link

github-actions bot commented May 6, 2024

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
Copy link
Member

nijel commented May 6, 2024

To implement this:

  • Add Key filter field to the Component model
    • Add validation to force it empty for bilingual files which do not use keys
    • Include it in component creation forms
    • Include it in settings form
    • Include it in the API serialization
    • Add documentation for the field with some examples for the filters
  • Implement actual filtering in Translation.check_sync
  • Add tests to see the filtering is applied
    • Initial creation of a component with a filter should filter out strings
    • Adding a filter to an existing component should remove filtered out strings
    • Removing a filter from existing component should bring back filtered out strings

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

No branches or pull requests

2 participants