In our website, from the bottom left menu, people can use a “Translate page” button to directly open the file in Transifex editor, ready to translate. The target page is build following this logic (QGIS-Documentation/versions.html at 42cc3c09003e2d65224daa7b0388f8db22546b69 · qgis/QGIS-Documentation · GitHub and L50). It used to work for years, over releases.
I recently updated our files with the new release and am surprised to see that the logic with filename in the URL is no longer used. Instead a slug is shown in it: e.g. https://www.transifex.com/qgis/qgis-documentation/translate/#fr/locale-en-lc-messages-docs-index-po--release-3-28 has turned into this unpredictable https://www.transifex.com/qgis/qgis-documentation/translate/#fr/39769e1189bf5e40b0811e3c4155e080.
Is there a way to make it recognize the “old” formatted way of building URL?
Thanks in advance.
Hello DelazJ,
I think the updates related to branches affected how this URL is composed; to suggest a way of building this URL, please let me know what elements (resource, project, branch, specific string) you are trying to reach using this URL.
Thanks in advance,
Sandy
Hi Sandy,
Thanks for getting back to me.
I don’t know if I really work with the new branch system (assuming I understand your remark); we have only one branch we translate at a time. But let me try to provide the details:
- The project is QGIS Documentation localization | Transifex (and the source in github is GitHub - qgis/QGIS-Documentation at release_3.28) - we are translating a full documentation)
- The resource: well, all the files are concerned but let’s just take that index file (https://www.transifex.com/qgis/qgis-documentation/39769e1189bf5e40b0811e3c4155e080/ whose source is QGIS-Documentation/index.po at release_3.28 · qgis/QGIS-Documentation · GitHub). What I would like is a URL that derive from locale//LC_MESSAGES/docs/index.po when I hit the “Translate” button
- strings: I don’t think they are relevant here (all would be concerned, as parts of resources). We don’t have ways to reach individual strings. Just finding the resource URL from outside Transifex is necessary.
Hope that clarifies and helps.
Thanks again,
DelazJ
Hello,
Thank you for the details you provided to me; The first root cause I suggested (branches functionality affecting this URL) was incorrect; please accept my apology.
Returning to your main answer, I’m afraid to tell you that it is impossible to return to the old URL building. Currently, as you described, the path to access a resource translation in the editor includes the slug. This change was done to homologate how we identify (the slug is the unique resource’s identifier) and work with the resources in the API, UI, and CLI.
You must implement the needed changes on your project to adapt to this change and start using the resource slugs instead of the resource names.
In case you need, you can query all your project’s resources details using this endpoint List resources.
Regards,
Dear Sandy,
Thank you for the details you provided to me; The first root cause I suggested (branches functionality affecting this URL) was incorrect; please accept my apology.
No worries. We need hypotheses to test in order to find the right root cause (and hopefully fix it).
You must implement the needed changes on your project to adapt to this change and start using the resource slugs instead of the resource names.
Not the answer I expected but, well… I will see how I can play with that and implement that feature.
Thanks.