Open rakekniven opened 4 years ago
Hello @juliushaertl Can you help to find out how to add translator comments to vue files. The comments need to show up at Transifex. Started that topic last friday in the community chat. Maybe you remember :-)
Thanks a lot for going over this. I'll need to have another look on how we could work around that limitation which mainly comes from the way we extract translations from vue files by manually building a fake file only containing the t()
method calls.
We probably can extend the query to include the comments with including the line before or ideally find a tool that can extract proper pot files out of vue.js.
\<\!--(.*)\n(.*)\Wt\s*\(\s*'([\w]+)',\s*'(.+)'
\/\/(.*)\n(.*)\Wt\s*\(\s*'([\w]+)',\s*'(.+)'
An option would be to do it similarly as the vue components with https://github.com/nextcloud/nextcloud-vue/blob/master/build/extract-l10n.js but that does not seem to take comments into account by default but it should be possible.
Just downloaded the server repo (master) from GitHub today and did a search:
That's a lot đ
Might not catch multiline comments but I'm not even sure the other languages support that...
Started to add result to the docs. See https://github.com/nextcloud/documentation/tree/rakekniven-patch-1
Hello Julius, any news on that vue thing?
The topic started and the end of interest. Apparently, the developers don't really care about the applications being well translated by the translators :grimacing:.
@Valdnet
The topic started and the end of interest. Apparently, the developers don't really care about the applications being well translated by the translators đŹ.
People underestimate us (the translators), I have staying power with something like this. The topic "vue" is still missing. Then I will write a message to all (!) Developers. Still have to find the right channel to reach everyone.
We can then also add comments to the source code. There will be a lot of PRs.
Hello @juliushaertl Julius, any news on that vue thing?
Often the strings lack of context. Nearly no comments for the translators are available. The docs at https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/l10n.html?highlight=translators#hints mention hints.
Target of the issue is to improve docs and ask all devs to add comments.
Nextcloud is using gettext for some languages. But there are more.
Does the syntax work for all languages? What about c++? Swift? vue?
Here I will collect working code:
PHP:
Code:
Javascript:
Same as for PHP
Code:
Vue
Code:
C++ (Qt):
Code:
Link to source example: https://github.com/nextcloud/desktop/blob/master/src/gui/folderstatusmodel.cpp#L976
https://doc.qt.io/qt-5/i18n-source-translation.html#translator-comments
Android
Code:
Swift
Code: