littleredbutton/cloud_bbb

List of wordings that aren't visible in Transifex, so can't be translated

Opened this issue · 20 comments

Describe the bug
List of wordings that aren't visible in Transifex, so can't be translated in other languages :

  • Start
  • Open room
  • Clone room
  • unlimited
  • Moderator

Nextcloud BBB App 2.5.0
BBB 2.7.2
Nextcloud Hub 6 - 27.1.2

At your disposal for further information.

These words are missing from the translation files

@nickvergessen I guess we still have an issue with translations. If I run translationtool.phar create-pot-files those terms above pop up, but they are not available in transifix. Do you know if I have to change anything else, due to moving this repo to another organization? According to https://docs.nextcloud.com/server/stable/developer_manual/basics/front-end/l10n.html#translation there is not much configuration.

<a href={api.getRoomUrl(room)} className={`button ${room.running ? 'success' : 'primary'}`} target="_blank" rel="noopener noreferrer" title={t('bbb', 'Open room')}>

Hmm TSX files should be found:
https://github.com/nextcloud/docker-ci/blob/master/translations/translationtool/src/translationtool.php#L70

Maybe the ` usage in the line breaks it somehow?
But then why would you see it locally?

@nickvergessen I checked the pot file again and it seams that the term will only be fined in the compiled js code.

#: /home/klaus/Repos/cloud_bbb/js/manager.js:2
msgid "Open room"
msgstr ""

There are other terms found in the RoomRow.tsx, so I guess it is not a generell error. Can you tell me where I can open an issue for this?

Hi @sualko and @nickvergessen, if the automate tool that generate the transifex entries fails somehow, is it possible ti bypass this tool bugs by creating ourselves the entries in the transifex ? Or does the tool erase the entries it did not found (because of its lacks/bugs) ?

As mentioned above, maybe you can try to break the line:

<a href={api.getRoomUrl(room)} className={`button ${room.running ? 'success' : 'primary'}`} target="_blank" rel="noopener noreferrer" title={t('bbb', 'Open room')}>

Into multiple

<a href={api.getRoomUrl(room)}
className={`button ${room.running ? 'success' : 'primary'}`}
target="_blank"
rel="noopener noreferrer"
title={t('bbb', 'Open room')}>

My assumption is that the ` character in class name is breaking it.

So could also try temporary for a sync of the translations to remove that bit:

<a href={api.getRoomUrl(room)}
target="_blank"
rel="noopener noreferrer"
title={t('bbb', 'Open room')}>

Try in PR #283

Hi @nickvergessen, the "break of lines" doesn't seem to improve the Transifex parser results. How could we debug this ?

A quick test locally confirms my suspicion from #261 (comment)

On master there are 18 strings found in ts/Manager/RoomRow.tsx

Deleting line:

						className={`button ${room.running ? 'success' : 'primary'}`}

And running it again finds 23 strings in ts/Manager/RoomRow.tsx

So yeah the ` character is the problem. Can you "inject" the class name ready calculated instead of calculating it here?

Wouldn't it be more interesting to fix the bug in translationTool rather than discovering labels are missing from tsx files ?

the "problem"/"bug" is in the gnu tool gettext not our .phar btw.
I guess it just does not support the JSX/TSX syntax fully.

@nickvergessen Indeed, this is a xgettext failure. The first backtick is taken in account, but the ending one is not. If there are t() calls between the first backtick and the third (as it seems to re-parse), then the sentences are lost by translationtool.

Please note that if the translationtool is called AFTER the build-js, then it works for all sentences, as it find them in the TypeScript file converted into classical JS (in js/manager.js). This would be probably the best workaround for the xgettext bug. May these actions be re-ordered ? (@sualko ?)

If not, i've made a PR #284 whose purpose is to avoid all these backticks troubles.

@nickvergessen : i've made some improvements in translation.phar, in order to help detecting these errors.
-> add commands options (-h, -v)
-> some verbose logs
-> add a "check-files" action, that use "extract-all" in order to detect all backticks errors.
Are you interested in such a PR in the translation.phar, or is this tool considered as too important to be changed ?

Are you interested in such a PR in the translation.phar

Sure go ahead :) Put send them against the php file instead. We will recreate the phar later.

This would be probably the best workaround for the xgettext bug.

We can't do that for apps that send minified js (e.g. all vue apps we maintain) as they end up with garbage strings like a, strong and things a like from various HTML attributes.

Hi,
The PR with backticks fixes was merged yesterday. Could you tell how and when does it may impact Transifex content ?

It updates every night between 3 and 6am CE(S)T.
So it should have uploaded the new strings this morning and would download translated strings tomorrow when someone translated them

There might be a trouble. Transifex tell me 138 sentences for "bbb" application. The .pot construction with translationtool gives about 160 msgid. And of course, the new sentences theorically accessible trough the backticks removal are not found.

Hi @sualko and @nickvergessen. So i've modified translationtool so that i can check all the missing sentences, changed all the backticks sentences accordingly, commited them, but nothing happen in Transifex. I don't think i can access to any logs to the actions linked to the translationtool and transifex, but it seems sticked here. Would you have a look on it please ?

I'm on vacation starting tomorrow. We can try to have a look during the contributor week either together or I do it alone then

I'll be back from Berlin conference on 16th. I will be pleased to have a look from the 17th with you.

@nickvergessen @sualko : i've just seen that the words have been integrated recently in the Transifex. (includes also the new sentences from the PR #281 ). Don't know if someone did something special, but maybe this ticket can be closed ?