sandstorm-io / sandstorm

Sandstorm is a self-hostable web productivity suite. It's implemented as a security-hardened web app package manager.
https://sandstorm.io
Other
6.72k stars 705 forks source link

sandstorm translations (i18n) #557

Closed mrflos closed 6 years ago

mrflos commented 9 years ago

I would like to contribute to this project by allowing to change the language of the sandstorm admin bar. Any plans or guidelines for doing it?

kentonv commented 9 years ago

Hi Florian,

This is something we definitely want to do, but it might make sense to hold off at the moment as we're in the process of revamping the entire UI, and any translations done now might then just have to be re-done. We should make sure as we code the new UI that we set things up to make translation easy...

mrflos commented 9 years ago

@kentonv ok thank you, i will follow the future changes, and propose something when the time comes! Happy coding!

MaDDmin commented 7 years ago

Has this progressed at all?

matbrgz commented 7 years ago

Weblate - continuous translation is a nice app to keep the translates update..

urakagi commented 7 years ago

Is there some suggestion of entry point about how to localize Sandstorm?

zenhack commented 7 years ago

There's a blurb here:

https://github.com/sandstorm-io/sandstorm/blob/master/CONTRIBUTING.md#internationalization-i18n

@kentonv, suggest re-opening this?

urakagi commented 7 years ago

Yap I have found that, but I think I need a mentor teach me about how to change HTML templates since I'm new to Meteor. I even don't know where to find the template files :cry:

zenhack commented 7 years ago

Re: getting started with meteor, I'm sympathetic -- we could really use a few more active people who knew their way around the framework -- but unfortunately, I'm not that, and am not really in a position to do mentoring on the topic of meteor (the size of which has somewhat discouraged me from trying to hack on sandstorm core myself...). All I can suggest is going through the tutorial on meteor.com (the one with blaze, as that's what sandstorm uses).

As to the locations of the templates:

$ grep -r '<template' shell | sed 's/:.*//' | uniq
shell/client/notifications.html
shell/client/setup-wizard/wizard.html
shell/client/widgets/widgets.html
shell/client/billing/billingPromptLocal.html
shell/client/admin/network-capabilities.html
shell/client/admin/personalization.html
shell/client/admin/maintenance-message.html
shell/client/admin/stats.html
shell/client/admin/app-sources.html
shell/client/admin/user-invite.html
shell/client/admin/hosting-management.html
shell/client/admin/user-details.html
shell/client/admin/system-status.html
shell/client/admin/email-config.html
shell/client/admin/user-accounts.html
shell/client/admin/identity-providers.html
shell/client/admin/organization.html
shell/client/admin/networking.html
shell/client/admin/admin.html
shell/client/admin/preinstalled-apps.html
shell/client/grain/grainlist.html
shell/client/grain/contact-autocomplete.html
shell/client/desktop-notifications.html
shell/client/shell.html
shell/client/powerbox-builtins.html
shell/client/apps/install.html
shell/client/apps/applist.html
shell/client/apps/app-details.html
shell/client/styleguide.html
shell/client/grain.html
shell/client/accounts/email-token/token-templates.html
shell/client/accounts/identity/identity.html
shell/client/accounts/login-buttons.html
shell/client/accounts/account-settings.html
shell/client/shell-client.js
shell/packages/sandstorm-ui-powerbox/powerbox.html
shell/packages/sandstorm-ui-topbar/topbar.html

(The meteor app is all under shell/).

caasi commented 7 years ago

@urakagi

I try to setup the i18n environment with tap-i18n and invite you as a collaborator: https://github.com/caasi/sandstorm/commit/3aedb5ac8a0bd879e8273183b167a35b4bfb2593

If you have a local sandstorm installed, you have to change UPDATE_CHANNEL in /opt/sandstorm/sandstorm.conf to none.

Then you can test translations with:

make shell-build
make update

Should we work together?

urakagi commented 7 years ago

@caasi Of course, I'm reading Meteor documents now, and then will try translations with your fork. Thanks!

caasi commented 7 years ago

BTW, I am replacing strings with tap-i18n helpers. You can help me editing en.i18n.json or start writing zh-TW.i18n.json.

mrflos commented 7 years ago

Hello, thanks for starting this work! I could do fr.i18n.json and ru-RU.i18n.json for french and russian translations.

@caasi : could you tell me when en.i18n.json is including all the templates ? Thanks in advance!

caasi commented 7 years ago

@mrflos Ok. I will notify you when en.i18n.json is ready. It will take many days.

urakagi commented 7 years ago

OK, I think I'll start with zh-TW.i18n.json tomorrow. If able I'll also add Japanese and maybe simplified Chinese or Vietnamese.

ocdtrekkie commented 7 years ago

Awesome to see people working on this. πŸ‘

Probably my biggest question for translators will be how Sandstorm-specific terminology gets translated, and whether or not we'll also need translation of at least some of the basic documentation on what that terminology is. "Grain" is probably the most critical to get right.

urakagi commented 7 years ago

Grain is very...hard to translate to Chinese. (Japanese will be easy though) I think I will use a word with similar meaning on Sandstorm, but not similar to the original definition of "grain".

note: "grain" will be translated to "ζ²™η²’" which means "sand grain", as this is a "Sand"storm's grain.

urakagi commented 7 years ago

@caasi Hello, how are you doing when want to refresh the translation list? I tried "Hakcing on the Shell" in https://docs.sandstorm.io/en/latest/install/, but fails in some root or not root, I don't understand why but Sandstorm tells me to run as root and Meteor tells me you can't run as root and... Do I need to make and make install each time I want to check my translations? Thank you very much.

*edit: I need to change /opt/sandstorm to be owned by my account (i.e. romulus) rather than root (default). Then hacking on the shell works.

urakagi commented 7 years ago

@zenhack Do you know what is Sandstorm's "Startup file" so I can put the language-selecting code into it? Here is the language-selecting code: https://github.com/TAPevents/tap-i18n#quickstart, Step 4

zenhack commented 7 years ago

I think the call to Meteor.startup in shell/client/shell-client.js is probably the right spot.

Quoting θ”‘δ»²ζ˜Ž (Romulus Urakagi Tsai) (2017-08-16 23:53:51)

[1]@zenhack Do you know what is Sandstorm's "Startup file" so I can put the language-selecting code into it? Here is the language-selecting code: [2]https://github.com/TAPevents/tap-i18n#quickstart, Step 4

-- You are receiving this because you were mentioned. Reply to this email directly, [3]view it on GitHub, or [4]mute the thread.

Verweise

  1. https://github.com/zenhack
  2. https://github.com/TAPevents/tap-i18n#quickstart
  3. https://github.com/sandstorm-io/sandstorm/issues/557#issuecomment-322962248
  4. https://github.com/notifications/unsubscribe-auth/AA18PuxMm4AV3avHVa-oDa-apjSe_Bmjks5sY7lPgaJpZM4FRajk
caasi commented 7 years ago

@urakagi:

I make shell-build; make upgrade every time as a normal user with the sudo permission(ubuntu in this case).

Any suggestions to speed up this process?

urakagi commented 7 years ago

@caasi

I have not tried shell-build; make upgrade, but by https://docs.sandstorm.io/en/latest/install/, section Hakcing on the Shell, I have this console: hacking on the shell Then, when any change occurs under shell/ directory, the front-end will reload automatically.

urakagi commented 7 years ago

@caasi , I made a small language sync tool for new keys, and it will sort json by keys. Is it troublesome to you?

caasi commented 7 years ago

Yes. Please do not reorder keys before I finish en.i18n.json.

I keep the key order to match the structure of html templates. Can you make your tool to keep it?

urakagi commented 7 years ago

Okay I have modified the sync tool to keep json order. Please help me check if en-i18n.json has correct order now. (It's output of the sync tool)

caasi commented 7 years ago

Yes. Thank you. Now I can rebase my commit. πŸ‘

BTW, can you remove trailing spaces next time?

urakagi commented 7 years ago

Okay, I have removed it.

caasi commented 7 years ago

thanks @kentonv for the list

en.i18n.json status:

kentonv commented 7 years ago

Hi all,

I'm very excited to see this happening! The approach taken in @caasi's fork looks good to me. Please keep us updated on progress!

kentonv commented 7 years ago

By the way, note that the identity refactor branch is likely to be merged in about a week:

https://github.com/sandstorm-io/sandstorm/pull/2960

This is a huge change to Sandstorm's code. Not a lot of words have changed in the UI, but some templates have been refactored, so this might be a disruptive merge. I think it should be safe if you want to merge/rebase that branch now and work on top of it, even though it's not in master yet.

matbrgz commented 7 years ago

Could I start translating to pt-br? At this moment in sandstorm app store haven't any software to hold translations. Can some one port Weblate or Zanata into ss?

malsony commented 7 years ago

@urakagi Glad to know that I am not the only one translating it into Chinese! I will joint you to work on the Simplified Chinese version, soon.

For now I have tentatively translated Sandstorm to γ€Œζ²™ε‘”γ€because of γ€Œθšζ²™ζˆε‘”γ€, Grain γ€Œζ²™η²’γ€orγ€Œι‘†η²’γ€, and some more in my own fork for the sandstorm.io website, check it out if you're interested.

urakagi commented 7 years ago

@malsony Hello :smile: Sandstorm has been translated into γ€Œζ²™θšι›²γ€ Taiwanese Government officially in some announcements, since it's a "cloud" service. (I don't know why it's not θšζ²™ι›², but well it already happened)

urakagi commented 7 years ago

@caasi

Do you have idea about how to i18n this string in JS file? https://github.com/caasi/sandstorm/blob/fddb08a1b2f809e14a392ee5a0daac8ce0155234/shell/client/grain/grainlist-client.js#L253

malsony commented 7 years ago

@urakagi OK, I'll follow the branch of @caasi to use his i18n table. And what should we do in case there is any new special terms?

ocdtrekkie commented 7 years ago

Might make sense to do what Wekan does and setting up something like Transifex once this is merged in, so people can work on translations for all of the different strings in different languages, and then Kenton can just push one button to merge the updates in.

urakagi commented 7 years ago

@malsony I think there's none, but you can check zh-TW.i18n.json here: https://github.com/caasi/sandstorm/blob/master/shell/i18n/zh-TW.i18n.json

caasi commented 7 years ago

@kentonv Looks like I need to check every changes of #2960. I will do it after we complete the English language file.

@malsony I will give you the commit bit. Please check your mail. ^^

caasi commented 7 years ago

@urakagi I think we can translate strings in JS files by using TAPi18n.__ function. check TAPi18n API for more information.

urakagi commented 7 years ago

@caasi @kentonv It seems like most of template files are replaced. Do we have a merge plan?

A translated version will run like this: (Only visible if your navigator.language is zh-TW or zh-CN) http://104.199.144.209.xip.io:6080/

caasi commented 7 years ago

I think there are some files need to be done:

I'm working on the wizard page.

After we finish those pages, someone should rebase to the upstream. Expecting a lot of conflict.

urakagi commented 7 years ago

@caasi I have replaced powerbox.html, and it seems like widgets.html and billing...html has nothing to replace. Is wizard page also done?

caasi commented 7 years ago

@urakagi I'll finish the wizard page tonight.

urakagi commented 7 years ago

I'm merging and fixing modified templates (13), this will take several days.

urakagi commented 7 years ago

@caasi @kentonv I have done merging, please check if I made something wrong. If there's no problem we may make a pull request.

caasi commented 7 years ago

@urakagi

Thanks for your hard work.

I am ok with it. I think we can patch missing translations in js files later. So you guys in PDIS can have the Chinese version ASAP.

Would you like to initialize the pull request?

urakagi commented 7 years ago

@caasi Okay, I have made a pull request #2985. This is my first PR, please remind me if I'm doing anything wrong. Thank everyone very much.

kentonv commented 7 years ago

Hey all,

I'm pretty excited about this! Of course, it's a rather huge change so I'll have to spend some time reviewing. I only work on Sandstorm on weekends, so this might take a few weeks. But I really want to get this in so I'll do my best.

urakagi commented 6 years ago

Update confirmed, thank you @kenton @cassi and everyone!

urakagi commented 6 years ago

Anyone close this issue or?

matbrgz commented 6 years ago

Now is able to translate? Where i find files to translate to pt-BR.