inkstitch / inkstitch

Ink/Stitch: an Inkscape extension for machine embroidery design
https://inkstitch.org
GNU General Public License v3.0
962 stars 171 forks source link

Localization support #47

Closed AkiraNorthstar closed 6 years ago

AkiraNorthstar commented 6 years ago

Is there a way to customize the language of Inkstitch? Or is this already prepared in the code? My native language is German and it would be nice (as with Inkscape) to be able to use the UI of Inkstitch in German as well. Of course I am aware that many technical terms are used in the subject of machine embroidery and these cannot be translated or not easily translated. I also thought more about the ToolTips and/or explanations of their individual settings. Of course I would like to help with the translation, if needed! Keep coding!

P.S.: Machine: Janome MC350E FW: 1.10 Format: JEF

X3msnake commented 6 years ago

this would be a nice feature to have i could contribute with a PT translation

@lexelby how complex it is for you to implement a po localization file? Something one can use with a translation software like https://poedit.net/ Maybe with this lib https://pypi.python.org/pypi/polib ?

AkiraNorthstar commented 6 years ago

http://wiki.inkscape.org/wiki/index.php/INX_Parameters seems to have mandatory localization support. But i also prefer po-files ;-)

X3msnake commented 6 years ago

@AkiraNorthstar had no idea, thanks for the info

lexelby commented 6 years ago

Wow, thank you two for offering to translate! I'd been waiting to learn and set up localization until someone was available to translate. I'll try to get polib or similar integrated soon. Thanks again!

lexelby commented 6 years ago

Btw @akiranorthstar, welcome to the project. Have you had any success with inkstitch's new integrated JEF format support?

AkiraNorthstar commented 6 years ago

@lexelby : At the moment I am still practicing with your latest tutorial to get something useful;-) I've been working with Inkscape for a long time, but with Inkstitch there's a lot of new things I need to know about. I don't mean the terms, but how I do something. I am using Embird 2017 currently as an editor. I am also satisfied, but I am looking for a solution on Linux (Fedora 27 x64). So: here I am! The conversion itself seems to work. My machine will show the right thing on the screen. But i haven't embroidered anything yet. I'll report it.

AkiraNorthstar commented 6 years ago

For info only: Adding Translation Capability for Python Script Extensions

lexelby commented 6 years ago

Ooh, nice tip. Thanks, @AkiraNorthstar!

lexelby commented 6 years ago

I'm currently about halfway through setting up POT files for you folks. It takes awhile to find all the strings that need localizing :)

AkiraNorthstar commented 6 years ago

We all understand english, so don't hurry ! The world was not created in one day either ;-)

lexelby commented 6 years ago

I'm excited to share that localization support is ready! I chose to go with CrowdIn, which will give you folks a nice interface to work on translations. As you enter them, it will create a pull request here, updating the files in translations/*.po. Easy peasy! Best part is, the dev build from the pull request will already have the new translations built in and you can download it from the Releases page and test it right away. Then just ping me in a comment so that I see the PR, and I'll review and merge.

To get started, send me an email at inkstitch-l10n at lex.gd letting me know what email address to send the CrowdIn invite to. The nifty thing is that, like travis-ci, CrowdIn's service is free because this is an open source project.

The INX files are a bit of a challenge. Sure, there's built-in localization support, as you mentioned, but it is designed only to be used for extensions that are actually bundled with Inkscape! There's no way for us to bundle our own locale files and have Inkscape use them when it generates the settings dialogs. The best solution I can think of is to create multiple copies of the INX file like embroider.inx.en_US and let the user copy theirs in...

I'll look into what to do about markdown files like the README soon. I think I can just enter them directly into CrowdIn.

Let me know what you folks think of this :)

X3msnake commented 6 years ago

Very nice Master.

You can add my github e-mail to the sw. Still haven't managed to make the extension work unfortunately but i will update on that on the multi-platform issue

No dia segunda-feira, 5 de fevereiro de 2018, Lex Neva < notifications@github.com> escreveu:

I'm excited to share that localization support is ready! I chose to go with CrowdIn, which will give you folks a nice interface to work on translations. As you enter them, it will create a pull request here, updating the files in translations/*.po. Easy peasy! Best part is, the dev build from the pull request will already have the new translations built in and you can download it from the Releases page and test it right away. Then just ping me in a comment so that I see the PR, and I'll review and merge.

To get started, send me an email at inkstitch-l10n at lex.gd letting me know what email address to send the CrowdIn invite to. The nifty thing is that, like travis-ci, CrowdIn's service is free because this is an open source project.

The INX files are a bit of a challenge. Sure, there's built-in localization support, as you mentioned, but it is designed only to be used for extensions that are actually bundled with Inkscape! There's no way for us to bundle our own locale files and have Inkscape use them when it generates the settings dialogs. The best solution I can think of is to create multiple copies of the INX file like embroider.inx.en_US and let the user copy theirs in...

I'll look into what to do about markdown files like the README soon. I think I can just enter them directly into CrowdIn.

Let me know what you folks think of this :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-362978602, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-r29WZ10ZvoqPH8EgnGz6NsC-qElks5tRoNRgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

Huh, it looks like the invite system just sends you this link: https://crowdin.com/project/inkstitch

I assumed I had to grant permission or something. Guess not. So I think you can just head over there, log in with GitHub, and start translating. Thank you!

X3msnake commented 6 years ago

what is a rung?

: embroider.py:1115

2018-02-05 13:34 GMT+00:00 Lex Neva notifications@github.com:

Huh, it looks like the invite system just sends you this link: https://crowdin.com/project/inkstitch

I assumed I had to grant permission or something. Guess not. So I think you can just head over there, log in with GitHub, and start translating. Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-363085964, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-vMrG6vMjguFUyCb8GlxGlBLnEQVks5tRwN7gaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

Great question! I thought I had documented this, but it's not in the readme. I'll add a task for that.

See this file for an example of rungs: https://github.com/lexelby/inkstitch/blob/master/images/satin_column_rungs_example.svg

The satin is defined by two long paths that are mostly parallel (the outer and inner rectangle in this example). The smaller intersecting lines guide the direction of the stitches at that point. I think of them as the rungs of a ladder.

AkiraNorthstar commented 6 years ago

rung = flow direction / flow path?

X3msnake commented 6 years ago

PT translation Done ;)

2018-02-05 16:06 GMT+00:00 AkiraNorthstar notifications@github.com:

rung = flow direction / flow path?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-363131266, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-lLiZI9-27Bc8AhIi1C1eDEYx06kks5tRycZgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

rung = flow direction / flow path?

You're suggesting that as a pseudotranslation? Or are you asking for clarification?

Another way of thinking about it is like rail ties on a railroad track. The two rails are the sides of the satin column, and the rail ties show where the stitches would go. The only difference to a railroad track is that you don't as many "rail ties" in inkstitch. Does that make sense?

I'd be amenable to changing the terminology used in inkstitch to "rail ties" or similar if you think that would aid user understanding, especially for other languages.

lexelby commented 6 years ago

PT translation Done ;)

Thanks! CrowdIn is supposed to create a pull request, but it didn't yet... I'll take a look later and try to figure out what went wrong.

X3msnake commented 6 years ago

It shows as pending approval

No dia segunda-feira, 5 de fevereiro de 2018, Lex Neva < notifications@github.com> escreveu:

PT translation Done ;)

Thanks! CrowdIn is supposed to create a pull request, but it didn't yet... I'll take a look later and try to figure out what went wrong.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-363161367, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-rEzfM6qo1RqBF_BeoAVLv9kDVzAks5tRz1IgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

AkiraNorthstar commented 6 years ago

You're suggesting that as a pseudotranslation? Or are you asking for clarification?

For clarification, but i have understand the other way of thinking... german translating about 65 % ready.

lexelby commented 6 years ago

I've set both of you as Proofreaders, which I believe lets you enter translations without getting them approved by me, and also approve translations from other people. You can also block folks if necessary. Details: https://support.crowdin.com/modifying-project-participants-roles/

X3msnake commented 6 years ago

okie dokie thanks ;)

2018-02-06 0:54 GMT+00:00 Lex Neva notifications@github.com:

I've set both of you as Proofreaders, which I believe lets you enter translations without getting them approved by me, and also approve translations from other people. You can also block folks if necessary. Details: https://support.crowdin.com/modifying-project-participants-roles/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-363273031, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-kIYq91rGGj_ock1sE5eMxl7yGSgks5tR6KvgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

AkiraNorthstar commented 6 years ago

Localization Inkstitch : 100% done (with approval)

lexelby commented 6 years ago

Weird... the German translations didn't need approval, but CrowdIn didn't make a pull request until I manually triggered a sync. Not sure what happened there. In any case, I'm merging your German translation now. Thank you!!

With German and Portuguese UI translations, this seems like a great place to declare version 1.2. I'll get that built once I get German merged.

lexelby commented 6 years ago

"Konturunterlageneinrückung" is my new favorite word. :D

X3msnake commented 6 years ago

@lexelby How do you choose the lang?

By the way the 1.2v is working awsome in the VM ;)

lexelby commented 6 years ago

You'd need to set the LANGUAGE environment variable to pt_PT (or another locale) before launching inkscape. I'm not sure if inkscape itself supports that environment variable, but it will pass it through to inkstitch.

X3msnake commented 6 years ago

@lexelby yes that's it it works :)

If you leave it in system default it does not work even tho inkscape is presented in the main OS set lang in my case i changed it to default to test, since i use it in en usually.

BTW fixed a typo in the translation

lexelby commented 6 years ago

Hmm, so you're saying that inkscape is seeing the system language setting, but inkstitch isn't? Could you open a terminal window and run env and post anything that looks language-related here? Be careful, there might be sensitive stuff in your environment so you may not want to post the whole thing here.

X3msnake commented 6 years ago

I will do that when i get home.

I am using the virtual image not my sys directly thanks for the warning

No dia sábado, 10 de fevereiro de 2018, Lex Neva notifications@github.com escreveu:

Hmm, so you're saying that inkscape is seeing the system language setting, but inkstitch isn't? Could you open a terminal window and run env and post anything that looks language-related here? Be careful, there might be sensitive stuff in your environment so you may not want to post the whole thing here.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-364649412, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-mlmBODcYOuhCbbHpbHCm1k1ziKVks5tTY_HgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

AkiraNorthstar commented 6 years ago

The submenu name (Embroidery) and all other names underneath are not translated. They are in the .inx files,but this is an inkscape thing. Another thing is, that not all words are translated in the moment: path1439

X3msnake commented 6 years ago

I noticed that too, thanks for posting

No dia sábado, 10 de fevereiro de 2018, AkiraNorthstar < notifications@github.com> escreveu:

The submenu name (Embroidery) and all other names underneath are not translated. They are in the .inx files,but this is an inkscape thing. Another thing is, that not all things are translated in the moment: [image: path1439] https://user-images.githubusercontent.com/16691957/36062379-adf981aa-0e6b-11e8-8224-a8d47966a54a.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-364651731, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-grp0iKnneHRLyyMc-lwHQdPxFynks5tTZUngaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

Oops! Nice catch. I'll try to put together a fix soon.

The menu items and the extension settings are under inkscape's control, and I'm pretty sure we can't get inkscape to see our translation strings unless inkstitch is bundled with inkscape. They don't release anywhere near fast enough to keep up with our rate of development.

The only other option I can think of would be for us to template the inx file and release "language packs" -- an extra zip file for each language that you can unzip into the extensions directory after unzipping the main inkstitch zip. That zip would contain just the INX translated to a given language.

Actually, the more I think about that, the more I like the idea! Thoughts?

lexelby commented 6 years ago

Hmmmm. Another sneaky idea is to include multiple INX files for each extension. They would be in a different language but still point to the same Python script. That lets us put it all in the same ZIP but it will clutter the extensions menu with extra entries -- potentially many if we get a lot of translations.

X3msnake commented 6 years ago

'I'm pretty sure we can't get inkscape to see our translation strings unless inkstitch is bundled with inkscape'

We can do that in the vm no?

I agree with the zipfile.

I could implement a Shell script on the vm to allow for easy change or just do a symlink folder for easy drag and drop update

I am also trying to sort out the code in inkscape that allows to make a toolbar. I wanted to have a inkstitch toolbar on the vm version too.

No dia sábado, 10 de fevereiro de 2018, Lex Neva notifications@github.com escreveu:

Oops! Nice catch. I'll try to put together a fix soon.

The menu items and the extension settings are under inkscape's control, and I'm pretty sure we can't get inkscape to see our translation strings unless inkstitch is bundled with inkscape. They don't release anywhere near fast enough to keep up with our rate of development.

The only other option I can think of would be for us to template the inx file and release "language packs" -- an extra zip file for each language that you can unzip into the extensions directory after unzipping the main inkstitch zip. That zip would contain just the INX translated to a given language.

Actually, the more I think about that, the more I like the idea! Thoughts?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-364668265, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-tg5z0V042JZkQmXDyw6z_Pa9Sigks5tTcOlgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

Sure, it could work to include it in the vm.

The thing is, I still want to make sure we support the normal zip install method. I really appreciate all the work you did to get the vm working, and it's great for unsupported platforms like 32-bit Linux and Windows. But it's a huge download, and my ultimate goal is to make it so that users don't have to figure out how to get an entire VM working just to use inkstitch.

I also haven't yet managed to download the vm image at all. Not sure if I'm doing it wrong or what.

X3msnake commented 6 years ago

I'm working on a new slim vm that will be under 1gb.

And the 32 bit version too

Maybe tomorrow i find some te to upload.

I would like to have it zip install too preferably of course.

No dia sábado, 10 de fevereiro de 2018, Lex Neva notifications@github.com escreveu:

Sure, it could work to include it in the vm.

The thing is, I still want to make sure we support the normal zip install method. I really appreciate all the work you did to get the vm working, and it's great for unsupported platforms like 32-bit Linux and Windows. But it's a huge download, and my ultimate goal is to make it so that users don't have to figure out how to get an entire VM working just to use inkstitch.

I also haven't yet managed to download the vm image at all. Not sure if I'm doing it wrong or what.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lexelby/inkstitch/issues/47#issuecomment-364677360, or mute the thread https://github.com/notifications/unsubscribe-auth/AKke-g6XBVs3Y1ulcxXw8esn6Udc9y5Rks5tTdvlgaJpZM4RwfJy .

-- Com os melhores cumprimentos, Vinicius Silva

lexelby commented 6 years ago

This issue discussion is getting pretty long, and we do have basic localization support. I'm going to create new issues for the INX and README localiation.

AkiraNorthstar commented 6 years ago

Yesterday i did some changes in the german messages.po. All changes are approveed, but crowdin make not a merge... v1.3.0 don't have the corrections.

lexelby commented 6 years ago

Yup, I only just saw it after tagging the 1.3.0 release. No worries, we'll release your fixes as 1.3.1.

AkiraNorthstar commented 6 years ago

But your favourite word "Konturunterlageneinrückung" will not exist anymore... sad but true

lexelby commented 6 years ago

Ah well.