writeas-gtk icon indicating copy to clipboard operation
writeas-gtk copied to clipboard

Make the app translatable

Open NathanBnm opened this issue 6 years ago • 3 comments

NathanBnm avatar Jan 24 '19 21:01 NathanBnm

Thanks for the suggestion -- do you have any hints on the best way to implement this?

thebaer avatar Jan 24 '19 21:01 thebaer

@thebaer The localization and internationalization story in Go isn't great, but I've worked on it a bit and would be happy to help. Using the facilities that have started to emerge in golang.org/x/text/message it's not too bad to roll your own. I had some trouble getting my catalog generation just right, but I can put those scripts online at some point and save you the trouble if you're using Go's template mechanism. If you're using Printf's heavily the package should support that out of the box.

EDIT: oops, I thought this was the writefreely repo for some reason. This is probably not applicable to the GTK app. Sorry :)

SamWhited avatar Jan 24 '19 22:01 SamWhited

I think you have to deal with po files like elementary developpers do. For example in elementary Code app it looks like this https://github.com/elementary/code/tree/master/po

You can take a look to the official documentation here : https://elementary.io/fr/docs/code/getting-started#Adding-Translations

NathanBnm avatar Jan 25 '19 14:01 NathanBnm