#14 Prepare a docs for translation project admins about placeholders checks
Closed 2 months ago by peartown. Opened 4 months ago by peartown.

Few explanatory sentences about setting up and use of placeholder checks in Weblate for translation project admins could be added to Project Configuration Good Practice in hosting.adoc.


Let me have some info documented in here for possible use:

The placeholders flag can be set to add a quality check on texts from source string that must not be missing in the translation. If missing, a warning will pop up to the translator.

Placeholders can be added by project administrators on a per-component or per-string basis, but not project-wide.

To set a placeholders for a component:
1- Go to the component page (e.g. https://translate.fedoraproject.org/projects/dnf5/dnf5/)
2- Manage menu > Settings item
3- In the Settings page, go to Translation tab
4- Scroll until you see Translation flags field
5- Write the placeholders flag expression in there

To set a placeholders for a specific string (which will override its component's placeholders):
1- When editing a string, go to the right-side sidebar and find Flags item
2- Click on the pencil icon to edit the flags
3- In the Translation flags field, write the placeholders flag expression in there

Some reference from Weblate documentation:
- Syntax on placeholders
- Customizing behavior using flags

I am transferring (your) text into asciidoc.

Do you have any real example of the placeholders' use, have you set this flag in a translation project?
As I do not have an experience with this, I am not sure e.g. if placeholders:{}:Rafael means that there are two placeholders in the string {} and Rafael, or rather a one 'combined' placeholder {Rafael}.

Would you like to be explicitly named as an author of the page (revision), or can I leave it to just the Fedora Localization Team (I always do so in case of my contributions)?

What do you think about this (modified) paragraph?

Weblate provides a wide range of quality checks on strings. A placeholders flag can be set to add a quality check on texts from source string that must not be missing in the translation. If missing, a warning will pop up to the translator. Besides being extracted from the translation file, placeholders can be added manually by project administrators on a per-component or per-string basis, but not project-wide.

The paragraph looks awesome.

Some example as requested:

Option "--alldeps" should be used with "--resolve"

placeholders:--alldeps:--resolve to make these two command-line options placeholders. This flag seems to be very good for per-string basis, because there isn't much occurrence of these options in this component strings. That's from dnf5/dnf5 (project/component).

Another example:

Failed to cleanup repository cache in path "{0}": {1}

placeholders:{}:{0}:{1}:{2} would be a good flag for the whole component if these terms come up very often. That's the case for dnf5/dnf5.

@rffontenelle: A related PR #12 has been pulled to stg. Once the staging docs is built, you can review finally.

If you have any further comment, proposal, etc., I'll be happy to hear from you.

Thanks. I actually have, but won't be able to formulate right now. Might he able to do later.

The placeholders docs went live in https://docs.fedoraproject.org.

Feel free to reopen if there is a need for further editing.

Metadata Update from @peartown:
- Issue status updated to: Closed (was: Open)

2 months ago

Login to comment on this ticket.

Metadata