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

Extended file mask definition feature and Placeholders support #7614

Closed
silopolis opened this issue May 8, 2022 · 3 comments
Closed

Extended file mask definition feature and Placeholders support #7614

silopolis opened this issue May 8, 2022 · 3 comments
Labels
question This is more a question for the support than an issue. wontfix Nobody will work on this.

Comments

@silopolis
Copy link

Describe the problem

The only field and '*' for language code available for defining po files mask is a little limited.
To give our example, for the LinuxCNC project we are migrating to po4a and WebLate, and are getting less comfortable handling 200k lines pot/po files. We manage both *NIX man pages and documentation in AsciiDoc format, and are considering splitting our translation files at directory or even file level. For this we would better be able to put the pot/po files in similar hierarchies under a common folder. Something like docs/po/$LANG/**/$SRC_FILENAME.po.

For other projects, less structured, being able to define an arbitrary number of paths/masks should certainly be helpful.

Describe the solution you'd like

It'd be nice to have extended wildcard (with globstar - **) and pattern matching support, as well as being able to create many masks.

Best would be to also support placeholders like those found in Crowdin:

  • %language% | Language name (e.g. Ukrainian)
  • %two_letters_code% | Language code ISO 639-1 (i.e. uk)
  • %three_letters_code% | Language code ISO 639-2/T (i.e. ukr)
  • %locale% | Locale (like uk-UA)
  • %locale_with_underscore% | Locale (i.e. uk_UA)
  • %android_code% | Android Locale identifier used to name "values-" directories
  • %osx_code% | OS X Locale identifier used to name ".lproj" directories
  • %osx_locale% | OS X Locale used to name translated resources (i.e. uk, zh-Hans, zh_HK)
  • %original_file_name% | Original file name
  • %file_name% | File name without extension
  • %file_extension% | Original file extension
  • %original_path% | Use parent folders' names in your project to build the file path in the resulting archive

But maybe that last one is for another request

Describe alternatives you've considered

No response

Screenshots

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented May 10, 2022

One component in Weblate has a single translation file, so the file mask is correct. You will need multiple components for multiple files. This can be automated by https://docs.weblate.org/en/latest/admin/addons.html#component-discovery

@nijel nijel added the question This is more a question for the support than an issue. label May 10, 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

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!

@github-actions github-actions bot added the wontfix Nobody will work on this. label May 21, 2022
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

2 participants