Translating SharpCap

Discussions, Bug Reports and Issues related to Beta versions of SharpCap
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Translating SharpCap

#1

Post by admin »

The next update to SharpCap 4.0 will contain something new – translations of the SharpCap menu system to selected languages :) below you can see an example of the SharpCap menus translated into French.
Capture.JPG
Capture.JPG (30.15 KiB) Viewed 3323 times
Actually, it's not quite as new as you might think – SharpCap has for a long time had a partial translation into Chinese courtesy of ZWO, but over the years as SharpCap has evolved parts of that translation have been lost. SharpCap 4.0 would have lost most of what was left of the original translation due to changes in the way that the menu and toolbar are put together, so it was time to do something about it.

Here's some more information about the new translations and where this might go in the future:

Q: What parts of SharpCap are being translated?
A: Right now, only the text in the menus and toolbars is included in the translation. If the translated versions are popular and successful then I will gradually include translations of more of the application – the next thing will probably be the names and values of the camera controls.

Q: What languages are available?
A: the first three languages to be available are Japanese, French and simplified Chinese. German has now also been added.

Q: What do I need to do to enable the translated version?
A: If you have set up Windows to run in one of the supported languages then you won't need to do anything – just start SharpCap and the translation will be automatically selected based on your Windows language.

If you want to run SharpCap in a language that is different to your Windows language then run SharpCap from the command line and add these parameters : /language <language code>. For example

Code: Select all

SharpCap.exe /language ja
SharpCap.exe /language fr
SharpCap.exe /language zh-CN
Q: what do I do if I want to continue using SharpCap in English?
A: In the SharpCap settings, check the option labelled 'Always Show SharpCap in English, even if a translation is available' and restart SharpCap
or
A: From the command line, run SharpCap and add the parameters "/language en"

Q: Some of the translations are wrong - how can they be fixed?
A: The translated text is being generated automatically by Google translate. I'm not a language expert so I have very little idea as to whether these translations are accurate, inaccurate or hilariously wrong. To allow for corrections and improvements, I've designed the system so that the translations are in text files that can easily be edited. More details below.

Q: Could you add support for <another language>
A: Actually this is something you can do yourself. More details below...

Robin
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Translating SharpCap : Editing a language file

#2

Post by admin »

SharpCap language files are stored in the LanguageFiles subfolder of the install folder.
Capture.JPG
Capture.JPG (24.61 KiB) Viewed 3322 times
You will probably not be able to edit the files in this location, so copy them to the desktop or some other folder and edit them there. Although the files are named with the .json extension, they are basically text files, so you can edit them with a text editing program. Even Windows notepad will do fine for this.

Here's an example of what the contents of the file will look like:

Code: Select all

	"{0} Cameras": "Caméras {0}",
	"{0} Frames": "{0} Cadres",
	"{0} Seconds": "{0} secondes",
	"Abort Running Script": "Annuler l'exécution du script",
	"About": "À propos de",
	"ADC Alignment": "Alignement ADC",
	"Apply processing to the preview image to enhance it or see more detail": "Appliquer le traitement à l'image d'aperçu pour l'améliorer ou voir plus de détails",
On each line, there is first the English text in double quotes, followed by a : then the translated text in double quotes. Each line then finishes with a comma. Do not change the English text or the structure of the lines – only edit the translated text inside the second set of double quotes.

When saving the changes, make sure that the file is saved to the same name and that the saved file is in UTF-8 format (this will most likely be the default, since the original file is in UTF-8. Failing to save in UTF-8 will probably lead to the translations all being wrong or SharpCap crashing when trying to use the updated file).

Once you have made your changes, copy the edited file back into the LanguageFiles folder and restart SharpCap (copying the file back will probably require administrator permission). Your changes should now show in the SharpCap menus and toolbars.

I would obviously very much welcome contributions of improved translations from SharpCap users. The only thing I would point out is that if you do decide to contribute your changes, by doing so you agree to give us unrestricted rights to use those contributed translations in future versions of SharpCap. Please see the AuthorInfo/Copyright entries at the top of the translation file more details on this.

Robin

Saving in UTF8 from Notepad - note that either of the UTF8 options should be fine
Capture2.JPG
Capture2.JPG (59.92 KiB) Viewed 3322 times
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Translating SharpCap : Creating a new language file

#3

Post by admin »

SharpCap is set up to make adding a new translation relatively easy – please follow the steps below:

1) ensure that Windows is set up to use the language that you wish to translate into.

2) run SharpCap from the command line adding the '/translate' parameter - for instance

Code: Select all

"C:\Program Files (x86)\SharpCap 4.0\SharpCap.exe" /translate
3) currently optional - use SharpCap and make sure that the area to be translated is shown. This is not necessary for the translation of the menus and the toolbars, but may be necessary when further areas are added to the translation.

4) close SharpCap.

5) look on your desktop – new translation files should have been saved there. For instance 'Menu_es-ES.json' for a Spanish translation.

6) edit the translation files to add translated text and then copy them back into the LanguageFiles folder as described in the post above.

Robin
remyastro
Posts: 42
Joined: Tue Sep 18, 2018 4:54 pm
Location: Gresse en Vercors (France)

Re: Translating SharpCap

#4

Post by remyastro »

Hi Robin,

What a suprise when I discovered that my favorite astro sofware had french Tabs in it!

Although translations made by Google are generally correct, some words may not be the exact ones when used by specific activities/leisures in different languages.

I would propose the following comments/improvements:

First line Tabs:
About this first line, french astro Softwares generally use Names instead of Verbs.
Below my proposals:

Fichier (instead of Déposer) - Cameras (instead of appareils Photo) - Capture (instead of Capturer) -Vue (unchanged) - Outils (unchanged) -Séquenceur(unchanged) - Scripts (instead of Scripting) - Aide (instead of Aider).

Second Line Tabs:
Only replacing 'Pile en direct' by 'Empilement' (Commencer à empiler en direct des images pour le ciel profond)

These are my first comments when discovering the new SC Version 4 in french. I believe that these changes will make the french version of SharpCap even more user-friendly for french speaking Astronomers !

I remain of course available for any further comments/dicussions if needed.

Cheers.
Remy
Last edited by remyastro on Thu Feb 25, 2021 5:27 pm, edited 2 times in total.
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Translating SharpCap

#5

Post by admin »

Hi Remy,

I'm glad you like the first steps of the French translation (even if it's only the menus so far). I will make the changes that you suggest for the next update. I think that the Google translation has done a better job for the French version than for the Japanese or Chinese versions – probably also helped by the fact that I still have a little bit of French from my schoolboy days and could make some corrections of my own to the automatic translation :)



cheers,

Robin
astfu
Posts: 12
Joined: Sun Feb 14, 2021 12:04 pm

Re: Translating SharpCap

#6

Post by astfu »

Hi Robin,

here my first version of german language files.
I have found:

"roi selection" is not in the file, I have edit - it works
pan/tilt is without ":", I have edit - it works

cheers

Sven
Attachments
UI_de-DE.json.txt
(361 Bytes) Downloaded 141 times
Menu_de-DE .json.txt
(5.89 KiB) Downloaded 147 times
Controls_de-DE.json.txt
(6.57 KiB) Downloaded 137 times
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Translating SharpCap

#7

Post by admin »

Hi Sven,

Thanks for contributing the translations – I have incorporated them into SharpCap and they will be available in tomorrow's update. Tomorrow's update will also have the ability to translate the text on the filter wheel/focuser/Mount UI - the trick for this (like for the ROI Selection) is to run the application with /translate and make sure the appropriate UI that you want to translate appears while running it. That should add the extra entries into the json file.

I will also have to think what to do about the amount of space allowed for the control labels – some of the German translations don't really fit properly, so I may need to make this space adjustable somehow.

thanks again!

Robin
astfu
Posts: 12
Joined: Sun Feb 14, 2021 12:04 pm

Re: Translating SharpCap

#8

Post by astfu »

Hi Robin,

here the latest update.

Cheers

Sven
Attachments
Menu_de.json
(5.9 KiB) Downloaded 155 times
User avatar
admin
Site Admin
Posts: 13122
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Translating SharpCap

#9

Post by admin »

Hi Sven,

Was the only change correcting the missing '{0}' in some of the translations?

cheers,

Robin
astfu
Posts: 12
Joined: Sun Feb 14, 2021 12:04 pm

Re: Translating SharpCap

#10

Post by astfu »

Yes
Post Reply