Skip to content
This repository has been archived by the owner on Dec 17, 2022. It is now read-only.

Translating Lacona Built-in Commands #129

Open
brandonhorst opened this issue Sep 13, 2016 · 4 comments
Open

Translating Lacona Built-in Commands #129

brandonhorst opened this issue Sep 13, 2016 · 4 comments

Comments

@brandonhorst
Copy link
Owner

As of Lacona 1.0.2, translation is now possible.

Translating Lacona Commands is not only a matter of translating a few words. Because Lacona supports many different ways to say the same thing, and because all languages have different structures for things like dates, there is some additional complexity that goes into it.

However, with the community that has developed, I know that this can be done.

I'd like the initial focus to be on translating the built-in commands:

  • calculate
  • call/text/email/facetime
  • schedule/remind me to
  • open/reveal/
  • activate/close/quit/relaunch/etc...
  • eject
  • reveal
  • turn on/turn off/toggle
  • define
  • translate
  • search
  • play/stop/skip/pause/etc...
  • shutdown/restart/log off/lock/sleep/etc...

Into a few core languages:

  • European English
  • French
  • German
  • Spanish
  • Russian
  • Chinese (Simplified)

Unfortunately, right-to-left languages such as Arabic and Hebrew are not possible at this time. This will be fixed soon.

If you speak another language and you'd like to take charge of adding support, we can probably make that work as well!

In order for this to work, a few lower-level phrases will need to be translated as well:

Very basic documentation is available, but more training will be required before we can start making real progress. But first, I'd love to just get a roll call. Who is interested in getting involved with this process? What languages can you speak? Do you have any coding/development experience?

I'm excited about working on this together!

@mynetx
Copy link

mynetx commented Sep 13, 2016

German for sure. Coding experience is given in a number of languages. How to get started?

@AlejandroHCruz
Copy link

AlejandroHCruz commented Sep 14, 2016

Count me in to translate into Spanish. What's our next step?
P.S. Spanish has several variants too, I'd try to be the most standard possible, but if we want to be more specific: I'm from Mexico.

@brandonhorst
Copy link
Owner Author

OK, thanks for volunteering!

The first step would be to read the translation docs: https://docs.lacona.io/docs/advanced/translation.html

Basically, right now, Lacona grammars look something like this:

const MyPhrase = {
  describe: () => <literal text='truck' />
}

We need to add a translations property, so it would look something like this:

const MyPhrase = {
  translations: [{
    langs: ['en'],
    describe: () => <literal text='truck' />
  }, {
    langs: ['en-GB', 'en-ZA', 'en-IE', 'en-IN'],
    describe: () => <literal text='lorry' />
  }, {
    lang: 'es',
    describe: () => <literal text='camión' />
  }],
  // a default describe should be provided in case none of the languages match
  //  usually American English
  describe: () => <literal text='truck' />
}

A good place to start is probably with the lacona-translate command because it is pretty simple.

I am going to keep all translations in separate branches until we are able to translate all built-in commands, because having a half-translated experience would likely be very frustrating.

There are also a few edge cases. For example, lacona-calculate uses MathJS to do its computation, which unfortunately does not have an option for the decimal separator discussion here. So we'll need to be creative with that if we're going to make it work properly. We'll have conversations about this in the individual repos.

By far the most complicated piece of translation is going to be elliptical-datetime. If you're up for that task, open up an issue on that repo and we'll discuss the cases there. Some English-language wordings can be translated, but some will need to be removed and others will need to be added.

@AlejandroHCruz
Copy link

I'll dive into it this weekend, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants