GithubHelp home page GithubHelp logo

Translations about immanuel-python HOT 31 CLOSED

NodBr avatar NodBr commented on July 2, 2024
Translations

from immanuel-python.

Comments (31)

NodBr avatar NodBr commented on July 2, 2024 1

Here's the file. If you find any other words that need translations, just tell me.

About finding all the words: Maybe we can try pushing only Portuguese, run some tests just to be sure you got them all before adding other languages.

About sub-locales Brazilian and European Portuguese do need separate translations. In Spanish, I suggest a Latin-American and an Eurpoean ones.

immanuel.po.txt

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024 1

Here they come:

# Angles (all masculine)

# Planets (all masculine, except Lua and Vênus) - you may notice we use the same gender of the god whose name is being used

# Asteroids - same idea: the same gender of the creature/god
"Quiron" masculine
"Pholus" masculine
"Ceres" feminine
"Pallas" feminine
"Juno" feminine
"Vesta" feminine

# Points
"Nodo Norte" masc
"Nodo Sul" masc
"Nodo Norte Verdadeiro" masc
"Nodo Sul Verdadeiro" masc
"Vertex" masc
"Lilith" fem
"Lilith Verdadeira" fem
"Sizígia" fem
"Roda da Fortuna" fem

# Eclipses (all masculine)

# Aspects
"Conjunção" fem
"Oposição" fem
"Quadratura" fem
"Trígono" masc
"Sextil" masc
"Septil" masc
"Semi-quadratura" fem
"Sesqui-quadratura" fem
"Semi-sextil" masc
"Quincúncio" masc
"Quintil" masc
"Biquintil" masc

About the dignities: some adjectives have the same form for masculine and feminine noums. Example: Júpiter (masc) is Regente of Aquário; and Vênus (fem) is Regente of Libra. In this case, in the dictionary, it will work for masculine, feminine and also for those you called "neutral o(a)". So, for each one, I'll give you the three forms (masculine, feminine, neutral), or leave one form if it's a case of "one size fits all". I also adjusted one or two forms to better fit on the way Brazilian naturally speak.

"Regente"
"Exaltado / Exaltada / Exaltado(a)" 
"Regente de Triplicidade"
"Regente de Termo"
"Regente de Face"
"Regente por recepção mútua"
"Exaltado / Exaltada / Exaltado(a)  por recepção mútua"
"Regente de Triplicidade por recepção mútua"
"Regente de Termo por recepção mútua"
"Regente de Face por recepção mútua"
"No elemento de regência"
"Em exílio"
"Em queda"
"Peregrino / Peregrina / Peregrino(a)"

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024 1

I'm posting this just to let you know I've tested the pt-BR option and it's working perfectly.

Applied it to my entire project and it worked seamlessly.

Once again congrats for the great work and thanks for welcoming my idea.

I'll start working on the Spanish translation. Since it's not my native language, it may take a little longer.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Glad to hear you're finding it useful! Internationalizing Immanuel would be a great idea - I don't actually have knowledge or experience in localizing Python projects, but since most (if not all) of the user-facing strings are in const/names.py then it should be feasible to set it up so that a user can set a locale in the settings and have it pull the strings from a translation file instead of the const. That way the contents of the names.py file are the only thing that needs translating. I can certainly work on setting this up if you can provide the actual translations, I'd be very grateful.

However if any deeper translation is required (ie. JSON keys, class properties, function names etc.) then I'd suggest forking the repo and creating separate projects for each language, as these would essentially be functional changes. If you go down this route then the license must stay the same in each fork since it's required for use of the Swiss Ephemeris.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

I'm happy you liked my idea. To be honest, I'm not a great programmer. So I had to do something really simple.

I created this fuction and I execute it on charts.name before creating the "subject"

def apply_translations(charts_names):
    houses = {
    2000001: 'Casa 1', 2000002: 'Casa 2', 2000003: 'Casa 3', 
    2000004: 'Casa 4', 2000005: 'Casa 5', 2000006: 'Casa 6', 
    2000007: 'Casa 7', 2000008: 'Casa 8', 2000009: 'Casa 9', 
    2000010: 'Casa 10', 2000011: 'Casa 11', 2000012: 'Casa 12'
}
    signs = {1: 'Áries', 2: 'Touro', 3: 'Gêmeos', 4: 'Câncer', 5: 'Leão', 6: 'Virgem', 7: 'Libra', 8: 'Escorpião', 9: 'Sagitário', 10: 'Capricórnio', 11: 'Aquário', 12: 'Peixes'}

    angles = {3000001: 'Ascendente', 3000002: 'Descendente', 3000003: 'Meio do Céu', 3000004: 'Fundo do Céu', 3000005: 'ARMC'}
    planets = {4000001: 'Sol', 4000002: 'Lua', 4000003: 'Mercúrio', 4000004: 'Vênus', 4000005: 'Marte', 4000006: 'Júpiter', 4000007: 'Saturno', 4000008: 'Urano', 4000009: 'Netuno', 4000010: 'Plutão'}
    object_movements = {0: 'Direto', 1: 'Estacionário', 2: 'Retrógrado'}
    points = {6000001: 'Nodo Norte Médio', 6000002: 'Nodo Sul Médio', 6000003: 'Nodo Norte', 6000004: 'Nodo Sul', 6000005: 'Vertex', 6000006: 'Lilith Média', 6000007: 'Lilith', 6000008: 'Sizígia', 6000009: 'Roda da Fortuna'}
    aspects = {0.0: 'Conjunção', 180.0: 'Oposição', 90.0: 'Quadratura', 120.0: 'Trígono', 60.0: 'Sextil', 51.43: 'Septil', 45.0: 'Semi-quadratura', 135.0: 'Sesqui-quadratura', 150.0: 'Quincúncio', 72.0: 'Quintil', 144.0: 'Biquintil'}
    asteroids = {5000001: 'Quiron', 5000002: 'Pholus', 5000003: 'Ceres', 5000004: 'Pallas', 5000005: 'Juno', 5000006: 'Vesta'}
    aspect_movements = {0: 'aplicativo(a)', 1: 'exacto(a)', 2: 'separativo(a)'}
    
    charts_names.HOUSES = houses
    charts_names.SIGNS = signs
    charts_names.ANGLES = angles
    charts_names.PLANETS = planets
    charts_names.OBJECT_MOVEMENTS = object_movements
    charts_names.POINTS = points
    charts_names.ASPECTS = aspects
    charts_names.ASTEROIDS = asteroids
    charts_names.ASPECT_MOVEMENTS = aspect_movements

It doesn't translate everything, just what I'm using, but I'll be glad to translate everything else.
Maybe the setting can have a "language" that can be changed and will execute the translation based on the language selected.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

I've pushed some changes to master which will allow various locale files to be dropped in, and the user will then be able switch language/locale by using the settings, eg. settings.locale = 'pt_BR'. All I need now is the translation files - I've created a branch for Brazilian Portuguese and the translation file is here: https://github.com/theriftlab/immanuel-python/blob/translations/pt_BR/locales/pt_BR/LC_MESSAGES/immanuel.po

As you'll see, the msgid entries are the English strings needing translation and the msgstr entries are the translations. I've filled in the ones you provided above, so if you could download the file and fill in the gaps then get it back to me (either here or email) that would be great. Of course, if you're familiar with Git then you can simply clone the repo & submit a PR with your changes to that file instead.

I had to scour Immanuel's code for translatable strings so I hope I've got them all! I would love to push the next package release as 1.3.0 and include Portuguese and Spanish, then maybe I can put out a call to other language translators too.

Also forgive my ignorance, but is European Portuguese (pt_PT) distinct enough to need separate translations? If the names/words in this project are the same across both languages I can simply copy pt_BR into pt_PT, or even consider just having one Portuguese file instead of supporting all sub-locales. (The same questions will apply to Spanish!)

Thanks again for your help.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

This is great - thank you! I have downloaded that & it's working great on my local copy. I'm currently writing automated tests for it, which will take me a little while, then I'll push it up & merge once it's all done. One question in the meantime:

Aspect movements have an (a) suffix, presumably for gender, but the aspect conditions don't - was this intentional? If not I'd like to keep these as consistent as possible, either by removing the (a) from the movements or adding it to the conditions. If it was intentional then all good, I will leave it alone!

# Aspect Movements

msgid "Applicative"
msgstr "Aplicativo(a)"

msgid "Exact"
msgstr "Exacto(a)"

msgid "Separative"
msgstr "Separativo(a)"


# Aspect Conditions

msgid "Associate"
msgstr "Associado"

msgid "Dissociate"
msgstr "Dissociado"

Also I appreciate the PR but will need to close it down - the translations needed to go into the locales/pt_BR/LC_MESSAGES/immanuel.po file in the translations/pt_BR branch - the locales/immanuel.pot file in master is the template for all translations and needs to be left empty.

In future I will likely create a specific branch for each translation, eg translations/es_ES (or whatever flavor of Spanish we're working with) then drop an empty immanuel.po in there under locales/es_ES/LC_MESSAGES.

If you are able to help with the Spanish translations it would be cool to have you fill in that file once I've set it up, and submit a PR into the translations branch. GitHub should then see you as an official contributor (not sure how to get that to show up on the repo page but I'll take a look when we get there!)

Thanks again.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

One more! I have discovered a few more words that need translating & have added them to the .po file in the translations/pt_BR branch here: https://github.com/theriftlab/immanuel-python/blob/translations/pt_BR/locales/pt_BR/LC_MESSAGES/immanuel.po

You'll see them at the end:

# For quadrant weighting
msgid "First"
msgstr ""

msgid "Second"
msgstr ""

msgid "Third"
msgstr ""

msgid "Fourth"
msgstr ""

This is for reporting how many planets are in each quadrant of the chart, so the output looks something like this:

First: 3, Second: 2, Third: 7, Fourth: 8

Once those are in, Brazilian Portuguese should be ready to launch. Thanks again for your work.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Hi Robert.

You are right. The "(a") thing is the due to the fact that, in Portuguese, adjectives and noums always have a gender.

I don't know if you had Spanish classes during your school years, but it's the same:

  • Red car = Coche Rojo
  • Red key = Llave Roja

(I know it can be kinda wierd for English speakers....... hehehehe...... It's something that haunts evey English speaker who wants to learn latin languages)

And we have the same with aspects:

  • Exact Conjunction = Conjunção exata
  • Exact Sextile = Sextil exato

So there are two ways of solving it:

  1. Having a gender value in the aspects dictionary: this would make the texts look more natural and written by a native. So, in a Trine, the aspect would be aplicativo while a Square would be aplicativa. It would work great in Portuguese, Spanish, French, Italian, and a bunch of others. But I can see how this can escalate real quickly wtih the German (3 genders) and what else other languages may ask you.
  2. Having a little compromise: this (a) thing in the adjectives is something we use regularly in documents, forms, etc. to show we are covering both genders.

So yeah.... the aspect conditions should be "Associado(a)" and "Dissociado(a)"

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

About the Quadrants:

For quadrant weighting

msgid "First"
msgstr "Primeiro"

msgid "Second"
msgstr "Segundo"

msgid "Third"
msgstr "Terceiro"

msgid "Fourth"
msgstr "Quarto"

No (a) thing, since we are just talking about Quadrants and "Quadrante" is male.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

I don't know if you're willing to do this, but here's the deal: as you can see in my examples about gender, the word order may be (and almost always is) different in different languages.

You have those str commands, like for the Aspects:

def __str__(self) -> str:
        return f"{self._active_name} {self._passive_name} {self.type} {_('within')} {self.difference} ({self.movement}, {self.condition})" 

In Portuguese, it would look much better if it was something like:

def __str__(self) -> str:
        return f"{self.type} ('entre') {self._active_name} e {self._passive_name} ('dentro de') {self.difference} ({self.movement}, {self.condition})"

It would sound more like "Conjunction between Sun and Moon within....."

Every language, different order for evey str (planets, houses, aspects, etc). I know it may escalate....

I can't even imagine how much work site like Facebook, Google and YouTube have to accomodate dozens of languages.....

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Thanks for the info, I have switched up some of the translations to be whole sentences with placeholders, which allows for custom sentences per language, so this should address your last comment. As for the genders, I'll look into this next - if there is a relatively simple way to assign gender to certain nouns and have the adjectives auto-suffix themselves accordingly then I'll try to implement that since it will look much nicer - otherwise we can go with the old -o(a) solution.

Thanks once again for your thorough help and input, this is becoming quite an education!

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Not a problem at all. I have a degree in Languages, so it not hard to think about solutions that can accomodate as many languages as posible.
About the gender idea:
1 - Bear in mind that gender may change in different. I mean, "Trine" in portuguese is masculine. But in Italian, it may be feminine and it German it may be neutral.
2 - For many languages, auto-suffixes may solve most cases. But, probably, there are languages where the gender may be marked as a preffix or even as as inffix (when it's in the middle of the word). Maybe, in some situations, the word may be really diffent. Even in English: you may use "handsome" to describe a man, but, for a woman, you generally use "beautiful". So suffixes may note solve all cases. So, my suggestion is to have this adjecitves as full words on the diccionary. "Exato" e "Exata" may be very simillar, but I don't know if in Arab or Japanese, it's just a couple ol letters different or totally differente words.

I think it might be easier than to create a whole suffix function that may cover just a couple languages.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Yes definitely going the way of whole words instead of suffixes. I've had a play with the translation functions & files and it seems that this is relatively straightforward. I will just need to maintain a map somewhere in the project of noun -> gender.

For the aspects you mentioned, I would just need a list of each aspect and their gender, but looking through the other translations I'm wondering if we need planet genders too? For example, some of the dignities (eg. "Peregrino") and the planet movement (eg. "Retrógrado") appear to be gendered adjectives too.

If so this also raises the question of extra objects the user might add from the ephemeris, such as asteroids or fixed stars, that we can't specify a gender for since the name is in the ephemeris, not in Immanuel - would these fall back to the gender of their type, ie. "asteroid" or "star", or just default to masculine?

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Yeah.... In Portuguese, everything has a gender (masculine or feminine). No exceptions. And every adjective will have the same gender as the noum it's related to.

So yeah... Some planets are masculine, some are feminine. Asteroids and Stars as well. So Moon will be "Peregrina", but Mars will be "Peregrino"

Everytime we look deeper in the code, it seems to get more complicated.... And we are mainly talking about one language.... Imagine what will happen when other languages start to ask for other things....

To be honest, for a Portuguese speaker, the "o(a)" sollution is absolutely ok.... we deal with it on a daily base in sites, apps, systems, forms, etc. I personally think that, if I had to create a library like yours, I probably wouldn't bother adding gender to every object: I'd use the "peregrino(a)" format and it'll be great.

As a Portuguese speaker, I'd be more than happy by having the words translated and the str printing things in a correct order. This gender thing is really secondary.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Just to put a little humor, this video shows how problems can grow quickly the more languages you try to accomodate perfectly: https://www.youtube.com/watch?v=0j74jcxSunY

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Haha that vid about sums it up! At least for the foreseeable future any translations will have to be fairly Western-Europe-centric (and their Central/South American variants of course).

Since the gender thing is pretty easy to set up, and Immanuel's string set is fairly small, I propose that we get a gender list of aspects and planets just to make the dignities, movements, aspect types etc. look nice, and for any outside asteroids/stars that users might include we just fall back to the -o(a) suffix. Presumably the other main European languages have similar gender-neutral adjectives so this can translate nicely across the rest.

Personally I think this is a decent compromise - like you say, anything more complex just raises endless rabbit-holes of more issues.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Sounds great to me.
So, what's the next step?
What can I help with?

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Coolio, these are the nouns I'll need to know the genders for:

# Angles

"Ascendente"
"Descendente"
"Meio do Céu"
"Fundo do Céu"
"ARMC"

# Planets

"Sol"
"Lua"
"Mercúrio"
"Vênus"
"Marte"
"Júpiter"
"Saturno"
"Urano"
"Netuno"
"Plutão"

# Asteroids

"Quiron"
"Pholus"
"Ceres"
"Pallas"
"Juno"
"Vesta"

# Points

"Nodo Norte"
"Nodo Sul"
"Nodo Norte Verdadeiro"
"Nodo Sul Verdadeiro"
"Vertex"
"Lilith"
"Lilith Verdadeira"
"Sizígia"
"Roda da Fortuna"

# Eclipses

"Eclipse Lunar Pré-natal"
"Eclipse Solar Pré-natal"
"Eclipse Lunar Pós-natal"
"Eclipse Solar Pós-natal"

# Aspects

"Conjunção"
"Oposição"
"Quadratura"
"Trígono"
"Sextil"
"Septil"
"Semi-quadratura"
"Sesqui-quadratura"
"Semi-sextil"
"Quincúncio"
"Quintil"
"Biquintil"

And I'd also appreciate if you could check the list of dignities for which ones need to change based on the planet in question (these will only ever apply to the main 10 planets):

"Regente"
"Exaltado"
"Regente de Triplicidade"
"Regente de Termo"
"Regente de Face"
"Regente por recepção mútua"
"Exaltado por recepção mútua"
"Regente de Triplicidade por recepção mútua"
"Regente de Termo por recepção mútua"
"Regente de Face por recepção mútua"
"No elemento de regência"
"Exílio"
"Queda"
"Peregrino"

I'm already adding in both masculine and feminine versions of the adjectives (and the neutral o(a) ones where they apply to potentially unknown objects) so once I have the noun genders I can figure out a way to map these somewhere & get everything working together.

I hate to tempt fate here, but once all that's in I think the Portuguese translation will be complete! It should also be a lot easier to get other languages in once the groundwork is all complete.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Fantastic stuff, thanks for doing all of that - I've got those in and they're all working / passing tests so that's almost a wrap on Brazilian Portuguese. I'm going to go over things more thoroughly over the next few days when I get time, and probably tighten up the automated tests too. Hopefully by next weekend Immanuel will have a new release! Thank you again for all your work on this - and if you're still up for helping with other languages after this rollercoaster then it should be much simpler going forward!

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

I'm very happy to see this great library growing.

Last week we talked a little about the custom sentences per language.

What do you prefer doing now? The custom sentences for portuguese? Or the Spanish dictionary?

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

I have put in a custom sentence for the aspect output, modeled on your example:

msgid "{active} {passive} {type} within {difference} ({movement}, {condition})"
msgstr "{type} entre {active} e {passive} dentro de {difference} ({movement}, {condition})"

In practice this would look something like:

Mercury Sun Conjunction within 08°20'43" (Applicative, Associate)
Conjunção entre Mercúrio e Sol dentro de 08°20'43" (Aplicativa, Associada)

Let me know if I got that right, also if any other sentences need to be customized. I'd like to get Portuguese looking good before moving on to Spanish.

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

It's great. I also looked for any "str(self)" in the code.
In the wrap.py file, there are two classes:

Class Object
    def __str__(self) -> str:
        if hasattr(self, 'house'):
            return _('{name} {longitude} in {sign}, {house}').format(
                    name=self.name,
                    longitude=self.sign_longitude,
                    sign=self.sign,
                    house=self.house.name,
                )

        return _('{name} {longitude} in {sign}').format(
                name=self.name,
                longitude=self.sign_longitude,
                sign=self.sign,
            )

The "in" must be "em"

Class Subject
    def __str__(self) -> str:
        return _('{date_time} at {lat}, {lon}').format(
                date_time=self.date_time,
                lat=self.coordinates.latitude,
                lon=self.coordinates.longitude,
            )

The "at" must be "em"

With this, I think Portuguese it ready to be published.

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Thanks for double-checking - those two are whole-sentence translations so the in/em etc. is all taken care of.

I've now pushed v1.3.2 which should have working Brazilian Portuguese! I'm going to close this as an issue now - instructions on contributing translations are in the README.md or we can continue with the .po files via email for future languages.

A big thank-you for your time and work!

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

@NodBr just to be awkward, I'm adding a few extra objects in - no rush on this but would appreciate if you could let me know the Brazilian and Spanish translations for them:

  • Part of Spirit
  • Part of Eros
  • Interpolated Lilith

I'm assuming their genders will all be feminine as the existing parts / Liliths are. Thank you in advance!

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

Not a problem at all.

Part of Spirit = Parte do Espírito (Female)
Part of Eros = Parte de Eros (Female)
Interpolated Lilith = Lilith interpolada (Female)

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Great, thank you - are these good for both Brazilian and Spanish?

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

In Spanish:

Part of Spirit = Parte del Espíritu (Female)
Part of Eros = Parte de Eros (Female)
Interpolated Lilith = Lilith interpolada (Female)

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Thanks for those, I'll get those in sometime today. Just to confirm, the separate "Roda" and "Parte" are correct for Portuguese?

msgid "Part of Fortune"
msgstr "Roda da Fortuna"

msgid "Part of Spirit"
msgstr "Parte do Espírito"

msgid "Part of Eros"
msgstr "Parte de Eros"

from immanuel-python.

NodBr avatar NodBr commented on July 2, 2024

from immanuel-python.

theriftlab avatar theriftlab commented on July 2, 2024

Excellent - I guess this is like English having both Part of Fortune and Lot of Fortune. Thank you again!

from immanuel-python.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.