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

Add thesearchpage application to nextcloud transifex #607

Closed
22 of 25 tasks
callmemagnus opened this issue Nov 8, 2023 · 20 comments · Fixed by #613
Closed
22 of 25 tasks

Add thesearchpage application to nextcloud transifex #607

callmemagnus opened this issue Nov 8, 2023 · 20 comments · Fixed by #613
Assignees

Comments

@callmemagnus
Copy link

callmemagnus commented Nov 8, 2023

👤 App repository

To be done by you

js/
vendor/
  • Create file .tx/config with the following content, replace {{APPID}} with your app id 3 times:
[main]
host     = https://www.transifex.com
lang_map = hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja, bg_BG: bg, cs_CZ: cs, fi_FI: fi

[o:nextcloud:p:nextcloud:r:{{APPID}}]
file_filter = translationfiles/<lang>/{{APPID}}.po
source_file = translationfiles/templates/{{APPID}}.pot
source_lang = en
type        = PO

🏗️ Sysadmin team

docker run -v /srv/cronie-data/transifexrc:/root/.transifexrc \
    -v /srv/cronie-data/gpg:/gpg \
    -v /srv/cronie-data/ssh/id_rsa:/root/.ssh/id_rsa \
    --rm -i ghcr.io/nextcloud/continuous-integration-translations-app \
    AUTHOR APPID

🔣 Translation team

  • Transifex: New resource should appear
  • Transifex: Do translations and check sync to repo
  • Add resource to wiki
@nickvergessen
Copy link
Member

Will have a look, mostlikely on friday

@nickvergessen nickvergessen self-assigned this Nov 8, 2023
@callmemagnus
Copy link
Author

I merged your PR. Is there anything else I need to do ?

@nickvergessen
Copy link
Member

So I synced the translations, but just for your information, the svelte seem to not be handled properly:
This string is not in the list of translated strings:
https://github.com/callmemagnus/nextcloud-searchpage/blob/main/src/components/Header/SearchBox.svelte#L91

@callmemagnus
Copy link
Author

So I synced the translations, but just for your information, the svelte seem to not be handled properly:

Indeed, none of them are correctly handled :-(

Is there a way for me to investigate it further ?

@nickvergessen
Copy link
Member

Maybe #475 (comment) can give you a trace?

@callmemagnus
Copy link
Author

Ok. So I need to generate a fake .js file so that the translation CI can parse it ?

Is this a correct understanding ?

@nickvergessen
Copy link
Member

Yes, that would work

@callmemagnus
Copy link
Author

What is the function name that is search in the files ?

I see translate is exported from @nextcloud/l10n but the comment you mentioned talks about t.

@callmemagnus
Copy link
Author

I pushed the script and the fake label file to develop.

Are you able to trigger the job to test it on that branch ? (Or can I do it ?)

@callmemagnus
Copy link
Author

Ok I used the translationtool.phar and it expects t(

@callmemagnus
Copy link
Author

Pushed a new version to develop that "works" with a local translationtool.phar

@nickvergessen
Copy link
Member

callmemagnus/nextcloud-searchpage@3039ad5

Works now. Also the new strings are found:
grafik

@callmemagnus
Copy link
Author

Thank you!

@callmemagnus
Copy link
Author

@nickvergessen sorry to bother you again but I have the feeling that only develop is retrieved.

E.g. my app description is different on develop than on main but I only see the one from develop on transifex.

@nickvergessen
Copy link
Member

nickvergessen commented Nov 17, 2023

all strings are combined, it starts with the master/main branch, so yeah the alter branches would win on the description it seems.

Hmm actually it should be the otherway around:
https://github.com/nextcloud/docker-ci/blob/master/translations-app/handleAppTranslations.sh#L37

@nickvergessen
Copy link
Member

Ah, but here we say use-first:
https://github.com/nextcloud/docker-ci/blob/master/translations-app/handleAppTranslations.sh#L76

So that should be it.

@nickvergessen
Copy link
Member

      --use-first             use first available translation for each
                              message, don't merge several translations

I guess we should turn it around, so that master/main wins

@nickvergessen
Copy link
Member

So we fixed that in the code, but can't roll out a new version of the container until next week

@callmemagnus
Copy link
Author

all strings are combined, it starts with the master/main branch, so yeah the alter branches would win on the description it seems.

Hmm actually it should be the otherway around: https://github.com/nextcloud/docker-ci/blob/master/translations-app/handleAppTranslations.sh#L37

Are the labels from the info.xml somewhat handled differently than labels from the code ?

I would have guessed that the scrapper just returned all values from main and develop in my case and made them available on the translation site.

My issues are:

  • info.xml labels (only description from develop is uploaded to transifex)
  • label updates in develop do not appear (what is the scan interval ?)

@nickvergessen
Copy link
Member

Are the labels from the info.xml somewhat handled differently than labels from the code ?

Hmm after checking the code, the answer should be no:
https://github.com/nextcloud/docker-ci/blob/master/translations/translationtool/src/translationtool.php#L293-L314

It should work the same way, so not sure why the one from your master is not picked up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants