Skip to content

Conversation

@mexvod
Copy link
Contributor

@mexvod mexvod commented Apr 14, 2025

Hi. I started working on a partial translation for ru language. Pless help me. How can I check in realtime in my nextcloud?

It talks about make

#671 (comment)

but, in pack.json exist only webpack

if i try to do "build" (after npm install):

9199 problems (9199 errors, 0 warnings)
9199 errors and 0 warnings potentially fixable with the --fix option.
webpack 5.98.0 compiled with 1 error in 17679 ms

can i change translations.js file anywhere on my local copy of nextcloud?

Thanks!

@paulijar
Copy link
Collaborator

The make tool is not mandatory, and the make build just runs these two commands:

npm install --deps
npm run build

See also https://github.com/owncloud/music?tab=readme-ov-file#build-frontend-bundle for the other options to build with npm.

The translations used for the Music app proper can be compiled with npm run l10n-compile and this covers maybe 95 % of the translatable strings. To test the remaining 5 % in the embedded Files player and the Dashboard widget, you need preferably the make tool and some additional tools as described in https://github.com/owncloud/music?tab=readme-ov-file#translation-scripts.

Do you get any more details about those 9199 problems when you run npm run build?

@mexvod
Copy link
Contributor Author

mexvod commented Apr 15, 2025

The make tool is not mandatory, and the make build just runs these two commands:

npm install --deps
npm run build

See also https://github.com/owncloud/music?tab=readme-ov-file#build-frontend-bundle for the other options to build with npm.

The translations used for the Music app proper can be compiled with npm run l10n-compile and this covers maybe 95 % of the translatable strings. To test the remaining 5 % in the embedded Files player and the Dashboard widget, you need preferably the make tool and some additional tools as described in https://github.com/owncloud/music?tab=readme-ov-file#translation-scripts.

Do you get any more details about those 9199 problems when you run npm run build?

Hello, Thank you for your reply! I think it's a linter

1:4    error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

2:24   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

3:3    error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

4:78   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

5:32   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

6:3    error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

7:53   error  Expected linebreaks to be 'LF' but found 'CRLF'  linebreak-style

etc.

I corrected the options:

new ESLintPlugin({ files: './js', overrideConfig: { rules: { "linebreak-style": "off" } } }),

and now it works for me!

Another question. Did I understand correctly that the file l10n/templates/music.pot can be left alone?

I will continue to translate, thanks!

@paulijar
Copy link
Collaborator

Okay, great. You probably have in your git settings core.autocrlf = true which has converted the LF style line-endings to CR/LF on checkout.

Another question. Did I understand correctly that the file l10n/templates/music.pot can be left alone?

Yes, I usually take care of updating this template file when there are any changes in the translatable content of the application. So at the moment, it should be up-to-date and need no updating.

@paulijar
Copy link
Collaborator

As a heads-up, I recently changed one of the translatable strings a bit in the commit ac98df2, so you might want to rebase your branch. Of course this is not the last string change ever so the target is ever-moving.

@ChibyX
Copy link

ChibyX commented Jun 18, 2025

Hello @mexvod! Are you still working on this project?

@paulijar
Copy link
Collaborator

paulijar commented Jul 1, 2025

@mexvod Also @ChibyX was interested in making the Russian translation. So if you are not planning to finalize this PR, then is it okay for you if he picks up from where you left?

@mexvod
Copy link
Contributor Author

mexvod commented Jul 1, 2025

@paulijar @ChibyX Hi guys! I went on vacation for a few months. Now I don't have a computer and I can't continue. I plan to come back by August. If @ChibyX you want to continue, I don't mind. I can help when I get home.

@mexvod
Copy link
Contributor Author

mexvod commented Aug 3, 2025

@paulijar I have completed the translation. Around 80% of the terms were found and selected via the UI, while the remaining 20% were difficult to locate in the app. As a result, some terms were chosen based on logical inference from the music player's context.

@mexvod mexvod changed the title WIP: Translation process (ru) Translation process (ru) - complete! Aug 3, 2025
@paulijar
Copy link
Collaborator

paulijar commented Aug 4, 2025

Okay, great! I briefly tested the translation and didn't find any technical problems. The .pot file in the master branch contains about 5 new strings after your latest merge so maybe you would still like to translate those? Those are all things which were already part of the previous Music release v2.2.0, no strings have been added since then.

@mexvod
Copy link
Contributor Author

mexvod commented Aug 4, 2025

Okay, great! I briefly tested the translation and didn't find any technical problems. The .pot file in the master branch contains about 5 new strings after your latest merge so maybe you would still like to translate those? Those are all things which were already part of the previous Music release v2.2.0, no strings have been added since then.

Yes, ok, I'll check

@mexvod
Copy link
Contributor Author

mexvod commented Aug 4, 2025

Okay, great! I briefly tested the translation and didn't find any technical problems. The .pot file in the master branch contains about 5 new strings after your latest merge so maybe you would still like to translate those? Those are all things which were already part of the previous Music release v2.2.0, no strings have been added since then.

Done

@paulijar
Copy link
Collaborator

paulijar commented Aug 4, 2025

There's something wrong in your latest commit. All the translations coming from the Dashboard widget and the Files player have got commented out like this:
image

This is what would happen, if you update the .pot file by running just npm run l10n-extract (or with make l10n-extract without having all the required utilities installed), and then update the .po file from the resulting .pot. Did you maybe do this? There should be no need to update the .pot file but it should be fine as it is in the master branch.

@mexvod
Copy link
Contributor Author

mexvod commented Aug 4, 2025

There's something wrong in your latest commit. All the translations coming from the Dashboard widget and the Files player have got commented out like this: image

This is what would happen, if you update the .pot file by running just npm run l10n-extract (or with make l10n-extract without having all the required utilities installed), and then update the .po file from the resulting .pot. Did you maybe do this? There should be no need to update the .pot file but it should be fine as it is in the master branch.

Yes, absolutely right, I touched POT.

@scrutinizer-notifier
Copy link

The inspection completed: No new issues

@paulijar
Copy link
Collaborator

paulijar commented Aug 5, 2025

Looks good now, thanks!

@paulijar paulijar merged commit 94b76ca into owncloud:master Aug 5, 2025
@paulijar
Copy link
Collaborator

This is now released in Music v2.3.0.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants