vkbo / novelWriter

novelWriter is an open source plain text editor designed for writing novels. It supports a minimal markdown-like syntax for formatting text. It is written with Python 3 (3.9+) and Qt 5 (5.15) for cross-platform support.
https://novelwriter.io
GNU General Public License v3.0
1.92k stars 99 forks source link

Translations of novelWriter #93

Open vkbo opened 4 years ago

vkbo commented 4 years ago

As of January 2022, translations are managed through the crowdin project page.

If you want the repository credit for large translation efforts, you can make a direct pull request. Otherwise, please don't make pull requests for translations. If you have produced a translation file locally, you can upload it yourself directly on the Crowdin page, and your translations will be added automatically.

If you want to contribute a new translation, or have any other relevant questions, please make a post in this issue thread.

Going forward, the process will be as follows:

Last updated on 2022-02-12

jyhelle commented 3 years ago

volunteering for French when ready ... regards, Jan

vkbo commented 3 years ago

Excellent. I will try to get the translation framework ready soon.

longqzh commented 3 years ago

I can translate to Korean and Chinese. Let me know if it ready :)

bkmeneguello commented 3 years ago

I can translate to Brazillian Portuguese and maybe help with the i18n development

vkbo commented 3 years ago

I can translate to Brazillian Portuguese

Excellent

and maybe help with the i18n development

If you have any experience with this for PyQt5 projects, it would be interesting to have a topic on the discussions page on how to implement it. I have made one branch in the past trying to do this, but abandoned it in the end.

bkmeneguello commented 3 years ago

I started a POC this weekend, I intend to open a WIP PR soon.

vkbo commented 3 years ago

I had a look at your branch, and it already looks good. Thanks a lot for doing this. We can discuss more in the WIP PR, but two things just from the start:

Edit: I'll add a note of the post-1.0 branching policy in the CONTRIBUTING file. I intend to keep main on stable code, and do all new development for the next releases on the dev branch. It makes it less risky for users to just clone main and run the code. Only patches will be applied directly to main going forward.

bkmeneguello commented 3 years ago

About the linter, I'm just adding the translations as fast as possible, I'll run flake8 before open the PR. I noticed the large merge you did recently, I'll rebase accordingly too. Also I'll reorganize the commits in a more logical order. But thanks for the feedback!!

bkmeneguello commented 3 years ago

@longqzh

I added translation support and portuguese translation, it would be nice if you could check what is required to proper chinese internationalization.

vkbo commented 3 years ago

Thanks to @bkmeneguello, the internationalisation effort for novelWriter is now in the dev branch, and will work its way into the main branch for release version 1.3. Bruno has provided the Portuguese translation, and I've added one of the Norwegian written forms.

This issue will be used to continue to coordinate the translation effort. I think it's a good idea to not make translations continuously, and instead focus on the full releases, and perhaps also select pre-releases. We will see what works best. Note that support for RTL languages is likely not complete at this point.

A brief guide has been added to the i18n folder describing how to contribute translations: https://github.com/vkbo/novelWriter/tree/dev/i18n

Since text is inserted into the exported project, a set of translation files have been added for the three words plus the "number words" used for this. These are just JSON files, and should be easy to translate. These work independently from the main GUI translation files, and I've added a separate dropdown box on the Build Novel Tool for selecting the language for exports.

bkmeneguello commented 3 years ago

@jyhelle NW is now ready for French!

jyhelle commented 3 years ago

Thanks, I'll begin next week for the messages (in the meantime I have translated most of the manual.) Cheers Jan

vkbo commented 3 years ago

Great! Just keep in mind that the manual is a work in progress and still changes quite often as I get feedback from users who ask for clarifications. I am also continuously adding to it.

But the translations of the manual don't need to follow that closely. The most important thing is that they are helpful to the users.

vkbo commented 3 years ago

I have never looked into what's required for translations of readthedocs documentation, but I found a guide here: https://docs.readthedocs.io/en/stable/guides/manage-translations.html

jyhelle commented 3 years ago

Which application isn't a work in progress ? No problem, I mainly used that translation exercise as a way to familiarise with the terms used in the program.

vkbo commented 3 years ago

I figured out a way to get translations on the Qt widgets (mostly dialog buttons) for languages that don't have a localisation file shipped with Qt. I'm adding a dummy_qtbase.py file in the i18n folder with QT_TRANSLATE_NOOP entries for the buttons and labels we need.

These translation entries will show up in the .ts files under the context names starting with Q for the Qt widgets. If the language you're translating already has entries for the Qt widgets in the global qtbase_xx.ts/.qm files, leave these blank. For other languages, fill them in. This applies to Norwegian and Portuguese at least. French and German will not need it.

I'll add this to the i18n readme as well.

jyhelle commented 3 years ago

The translation to French is done, I shall play with the app for one or two days to check and certainly polish a word here or there before uploading the .ts and .json files, but from a quick overview it seems OK.

vkbo commented 3 years ago

Great! I'm making a couple of improvements to how the Preferences and Project Settings dialogs are laid out to make them more flexible size-wise for translated texts that may be different in length than English. I can merge that PR now. It's ready.

Mainly, it allows the help text labels in these dialogs to be line wrapped. It is a bit tricky since they behave quite differently when word wrap is on, but I think I've solved it.

jyhelle commented 3 years ago

Nice, so far I managed to fit in the available space by changing a word or re-arranging the sentence, but line wrap is a good solution if the translated length is much more than the original english text I am presently struggling with a probable bug: I entered manually a tag, laziness to go into the menus, and I typed it wrong as @tme instead of @time. Of course it didn't become red but it was alone on the page so I didn't care... But nW did as it later expelled me with an 'horror message' ! It kindly proposed to backup the project but closed anyway

vkbo commented 3 years ago

I cannot immediately reproduce this, but could you make a new issue, explain how to make this happen, and copy/paste the content of the error message? When an error occurs, nW tries to still save your project, and will try a controlled shutdown afterwards. Since nW uses the Qt library, which is written in C++, a crash on the C++ side will break elements of nW, so the only safe way is to shut down and start again.

vkbo commented 3 years ago

As for the part about line wrapping, it is of course best if the translated text is roughly the same length as the English text as that is what the GUI was originally designed for. Although on dialog boxes and in tooltips, and other locations which already have line wrapping or plenty of room, it doesn't matter.

The approach to reword or try to convey the meaning by using different words or phrases is a good approach. I did that several places with the Norwegian translation. Norwegian sometimes requires more space than English, but I know enough French to know this is trickier with that particular language.

jyhelle commented 3 years ago

I just opened the bug report. It refers to v. 1.3a, I didn't check but it probably exists on 1.1.1 as well, but the line numbers in the messages refer to the 1.3 version

vkbo commented 3 years ago

@jyhelle, I see you don't have a fork of novelWriter for submitting a pull request for the French translation. I assume you've just been editing local files. Since your GitHub account is empty, I'm not sure how familiar you are with git, and if you're not, just send me an email and I'll give you a howto. I have one I use for work when people ask. I think you have my email address.

vkbo commented 3 years ago

I just published a beta release of the internationalisation version: https://github.com/vkbo/novelWriter/releases/tag/v1.3b1

Thanks for all the contributions. I will make a few more tests and tweaks before I make a release candidate in a couple of weeks. The language files for French and Norwegian are fine. There are 11 missing translations in the Portuguese. There may be more changes before the next release, so I will make a post here ahead of time so everyone has a chance to catch up. Between the release candidate and final release I only fix bugs, so there will likely not be changes after that.

Edit: Note that the 1.3 code has been moved out of the dev branch and now lives in the testing branch.

vkbo commented 3 years ago

Note that I've updated the About dialog to list contributions differently, and include translations. Let me know if you want to change the information listed there.

bkmeneguello commented 3 years ago

I will try to update the PT translation today

vkbo commented 3 years ago

Great! There's no rush though. I will not make the release candidate before at least April 11. I want to work with the beta release for a while first to see if it works fine.

vkbo commented 3 years ago

Today I've released 1.2.3 with a minor bugfix, the release candidate of 1.3 with all the internationalisation code and translation files, and then merged the whole 1.3 branch into the main branch.

I expect to release the 1.3 final release with all of your contributions in a week or two once I've tested it. I'm not sure how many use the pre-releases, but it would be great if those of you who've provided translations either test out the code in the current main branch or download the 1.3 RC 1 release. There are no missing translations, but in case there are mistakes you want to correct, or changes to make, it would be nice to have them in the 1.3 final release.

Thanks a lot for all your contribution, and especially @bkmeneguello who did most of the work implementing the translation code.

If anyone else here want to add new translations, please start from the dev branch and make pull requests there. The dev branch is the starting point for the next release, 1.4.

longqzh commented 3 years ago

@longqzh

I added translation support and portuguese translation, it would be nice if you could check what is required to proper chinese internationalization.

Hi, @bkmeneguello Thanks very much for adding internationalization!

Hi, @vkbo I added Chinese support and send PR to dev, please check and merge it :)

817

vkbo commented 3 years ago

Thanks a lot! There is a minor change I need you to make. I've added a comment on it in the PR. Otherwise it looks great :)

vkbo commented 2 years ago

I've just released 1.4 release candidate 1, which means 1.4 will be up in a couple of weeks. The new Simplified Chinese translation is already up to date, and I'll update the Norwegian. The Portuguese and French will also need a minor update. There are 24 new entries to be translated.

The 1.4 RC 1 release has been merged into the main branch, so the translations should be made from that branch as well.

jyhelle commented 2 years ago

I just downloaded the file, but QtLinguist finds no pending translations ...

vkbo commented 2 years ago

You have to run the setup.py qtlupdate command first to update the file. I try to avoid commiting updated ts files all the time as they clutter up the repository with large diffs.

Edit: If you don't have the tools installed, I can email you the updated file if you'd like. Just let me know.

Edit 2: I emailed it anyway, just in case. :)

vkbo commented 2 years ago

I have now released 1.5 Release Candidate 1. I've updated the US English and Norwegian translations.

Due to the removal of novel file layouts, and replacing these with different features, there are a number of changes to the GUi that requires new translations. 51 entries as far as I can see. There are a few more missing from Portuguese as this file wasn't updated for 1.4 either.

I plan to make the full 1.5 release around September 19th. If any of you want your translations updated for 1.5, I'd need them before that.

I can email you the file again if you need me to, @jyhelle. It's not a problem.

With the new release, a PDF manual is shipped with novelWriter. This makes it possible to build and ship your French translation of it as well, but the documentation has changed quite a bit since you did the work. I suppose it is a bit much to keep up with.

jyhelle commented 2 years ago

Yes, please Veronika send me the file as we did before. Regarding the pdf manual, I'll have a look at it but I'm not sure I can produce a good translation before the 19th (well, to be honest, read it "I'm pretty sure I can't" etc) but it will eventually be done. Thanks again for that so useful tool !

10 sept. 2021 20:09:02 Veronica Berglyd Olsen @.***>:

I have now released 1.5 Release Candidate 1. I've updated the US English and Norwegian translations.

Due to the removal of novel file layouts, and replacing these with different features, there are a number of changes to the GUi that requires new translations. 51 entries as far as I can see. There are a few more missing from Portuguese as this file wasn't updated for 1.4 either.

I plan to make the full 1.5 release around September 19th. If any of you want your translations updated for 1.5, I'd need them before that.

I can email you the file again if you need me to, @jyhelle[https://github.com/jyhelle]. It's not a problem.

With the new release, a PDF manual is shipped with novelWriter. This makes it possible to build and ship your French translation of it as well, but the documentation has changed quite a bot since you did the work. I suppose it is a bit much to keep up with.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[https://github.com/vkbo/novelWriter/issues/93#issuecomment-917107303], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ALHM7NWJFSALIS5KO3QGRNDUBJCTZANCNFSM4JGWLROQ]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAnSURBVHic7cEBDQAAAMKg909tDwcUAAAAAAAAAAAAAAAAAAAAAPBjRFIAASHKmKkAAAAASUVORK5CYII=###24x24:true###][Image de pistage][https://github.com/notifications/beacon/ALHM7NVSPV6FA7HLQ3C4IVLUBJCTZA5CNFSM4JGWLRO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG2U7EZY.gif]

vkbo commented 2 years ago

I will send the file. As for the PDF manual, it is probably better to implement the translation tool that the documentation package is designed to work with. I will look into it.

bkmeneguello commented 2 years ago

Hey @vkbo! I've been very busy these days and couldn't keep the translation updated. But today I configured an integration that could make our lives much better: https://crwd.in/novelwriter

I've shared the project on crowdin.com that allows us to have unlimited opensource projects managed. I set it up and everything is working now. There are integrations that you (as the owner of the Github project) can do. I will be happy to transfer the ownership of this project to you and help you to integrate this into the build workflow (but I suppose you will not need it since you are a very capable developer ;) )

To generate the translations you just need to click the "Build & Download" button.

Some tiny changes need to be made to the project: the i18n/nw_en_US.ts must be renamed to i18n/base.ts and uploaded to crowdin in the "content" tab (but I think with Github integration this could be done automatically). Then anyone can add the translations online and follow up the updates. Then, when you download the build artifact, it can be added to the i18n dir and voilá, everything will be there.

Please, let me know WDYT. As soon as you add yourself to the project I can promote you to manager (or look for some way to transfer the ownership).

Best regards!

vkbo commented 2 years ago

Hi! Thanks for setting this up. I'll look into making the needed changes. By the way, the base language is en_GB, not en_US, but I can probably generate the file. It's quite late here now, so I'll look at this maybe tomorrow. No need to transfer ownership. I'm happy to co-manage it.

vkbo commented 2 years ago

Ok, I've signed up.

I noticed that the tool doesn't accept that there are strings that don't need to be translated. That will be an issue between US and GB English, as almost all of them are the same. It is also why the Norwegian translation is at 98% and not 100%.

bkmeneguello commented 2 years ago

Maybe it's something in the configs. I noticed I can't add you as a manager. The "free" version only accepts one. I'll ask the support to migrate the ownership (for your future safety). I'll check the config.

bkmeneguello commented 2 years ago

I see what you said about the translations, but it's a good practice to have all strings translated, even when they are the same. I did it in the Portuguese translation. In Norwegian, you could only click the button "Copy source" to have them overwriten.

vkbo commented 2 years ago

If they migrate it, that's ok. I'm just a bit reluctant to have another auxiliary tool to keep track of and maintain. I currently have three that are low maintenance, but it's quite enough. This project is already taking up considerable chunks of my free time. I'm also wondering how to attribute the translators when the work doesn't come as a PR from a GitHub account, or has many authors.

tmarplatt commented 2 years ago

Are the example project documents translatable? It would be nice to be able to load them in the configured language.

It would give the user a full "native" introductory experience.

vkbo commented 2 years ago

No, the sample project is mostly intended for testing during code development. But there's a proposal to add template project support (#841) which would be a more natural way to support multiple languages.

tmarplatt commented 2 years ago

Oh. And here I was thinking the sample project was a killer feature. 🙃

So currently in new releases, the new project wizard does not allow users to create a sample project?

tmarplatt commented 2 years ago

Also: there is a non-localisable string "Save" in the Save button under Project Settings dialog > Auto-Replace

Screenshot

vkbo commented 2 years ago

Please file bug reports in separate issues. There's no way to properly track issue progress when filed in the middle of a thread, even if on a related topic.

vkbo commented 2 years ago

So currently in new releases, the new project wizard does not allow users to create a sample project?

The create sample project feature will be replaced with a template project feature when it is ready. There are several proposals of useful templates that can be added to a standard set of templates shipped with novelWriter, in addition to letting the users make their own.

tmarplatt commented 2 years ago

I'm sorry, and I've now filed #919.

tmarplatt commented 2 years ago

I need to understand the meaning of some strings. Posting these here so that other translators can benefit from the answers:

Edit: Also, are we translators supposed to choose the accelerator key on menu items? I noticed all menu items are bare of accelerators, but that it is possible to assign them (in which case QT Linguist complains about the lack of an accelerator in the original string).