New Celestia unified runtime database

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
pirogronian
Developer
Posts: 200
Joined: 05.01.2018
Age: 33
With us: 1 year 10 months
Location: Wrocław
Contact:

Post #141by pirogronian » 10.09.2019, 11:54

Actually I'm not waiting for 1.7 nor any other release, just waiting for my life energy to return :hi:

Avatar
Lafuente_Astronomy
Moderator
Posts: 436
Joined: 04.08.2018
Age: 21
With us: 1 year 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #142by Lafuente_Astronomy » 10.09.2019, 12:23

pirogronian wrote:Actually I'm not waiting for 1.7 nor any other release, just waiting for my life energy to return

Ahhh. Wanna have an energy drink?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Avatar
fyr02
Posts: 124
Joined: 19.04.2019
Age: 14
With us: 6 months 24 days
Location: San Diego, California (United States)

Post #143by fyr02 » 10.09.2019, 14:48

nice one.
I have my messed up origins; I can't control my mind. Also, did you know that cashews grow on top of apples?

Topic author
pirogronian
Developer
Posts: 200
Joined: 05.01.2018
Age: 33
With us: 1 year 10 months
Location: Wrocław
Contact:

Post #144by pirogronian » 10.09.2019, 15:17

Lafuente_Astronomy wrote:Ahhh. Wanna have an energy drink?
I'd prefer a new liver, pancreas and spleen. Maybe something more. Time will came, we will see. :wink:

fyr02 wrote:nice one.
What exactly?

Avatar
fyr02
Posts: 124
Joined: 19.04.2019
Age: 14
With us: 6 months 24 days
Location: San Diego, California (United States)

Post #145by fyr02 » 10.09.2019, 21:55

Smooth transition by Lafuente_Astro.
I'd prefer a new liver, pancreas and spleen. Maybe something more. Time will came, we will see.
Ahhh, the nice scent of surgical tools that comes when you realize that you've been working on this stupid space simulator for too long.

In all seriousness, you should probably release whatever you have for 1.7 as "1.7.0-pre1" or something
I have my messed up origins; I can't control my mind. Also, did you know that cashews grow on top of apples?

Avatar
Lafuente_Astronomy
Moderator
Posts: 436
Joined: 04.08.2018
Age: 21
With us: 1 year 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #146by Lafuente_Astronomy » 10.09.2019, 23:03

Actually, it's ok if you take your time or your energy in making AstroDB. I'm just interested in the prospects that such a database would bring to Celestia as a whole. And the prospects are huge
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

barrysingh101
Posts: 1
Joined: 23.09.2019
With us: 1 month 19 days

Post #147by barrysingh101 » 23.09.2019, 18:54

As Celestia have now ability to import new data, provided by user, there is a queston about translating such a data (for example - celestial object names, user defined category names etc). Current approach is usage of gettext, as for every other translatable string. But users providing new string are unable (without messing with system files) to provide translation for it. I see to solutions (not secessarily exclusive):

Allow users to bind own text domains and use dgettext when translating particular string.
Allow users to provide translations directly.
In both cases there would be a new class, incorporating string and translation method: domain name or array with translations.
Last edited by barrysingh101 on 10.10.2019, 19:09, edited 1 time in total.

Topic author
pirogronian
Developer
Posts: 200
Joined: 05.01.2018
Age: 33
With us: 1 year 10 months
Location: Wrocław
Contact:

Post #148by pirogronian » 23.09.2019, 19:47

To be precise, this mechanism isnt a part of official Celestia yet.
As I can remember (I stalled my work a bit), domain is automatically set to directory of processed data file.

Avatar
Lafuente_Astronomy
Moderator
Posts: 436
Joined: 04.08.2018
Age: 21
With us: 1 year 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #149by Lafuente_Astronomy » 24.09.2019, 13:27

barrysingh101 wrote:As Celestia have now ability to import new data, provided by user, there is a queston about translating such a data (for example - celestial object names, user defined category names etc). Current approach is usage of gettext, as for every other translatable string. But users providing new string are unable (without messing with system files) to provide translation for it. I see to solutions (not secessarily exclusive):

Allow users to bind own text domains and use dgettext when translating particular string.
Allow users to provide translations directly.
In both cases there would be a new class, incorporating string and translation method: domain name or array with translations.

Could you clarify to me what these things are?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

onetwothree
Developer
Posts: 324
Joined: 22.09.2018
With us: 1 year 1 month

Post #150by onetwothree » 27.09.2019, 14:33

barrysingh101 wrote:Allow users to bind own text domains and use dgettext when translating particular string.

That's what being implemented. Afair it's implemented for categories already.

Topic author
pirogronian
Developer
Posts: 200
Joined: 05.01.2018
Age: 33
With us: 1 year 10 months
Location: Wrocław
Contact:

Post #151by pirogronian » 30.09.2019, 10:01

Changelog update:
* Added Lua interface for names manipulation. It means user is now able to add and remove names of objects from Lua. Names local tova planetary system aren't supported yet.
* ...and somw bugfixes related to it.
* I started new branch as a merge proxy between master and AstroDb. It's still local, but you may notice recent commits in astrodb focused on avoiding name conflicts. It's my another try to merge it with possibly painless way. Perhaps many other changes could be done yet, but it become extremly difficult to maintain such a big branch separately. I'm only praying to God for @onetwothree acceptance, when it will become soon a pull request... :wink:

Avatar
Lafuente_Astronomy
Moderator
Posts: 436
Joined: 04.08.2018
Age: 21
With us: 1 year 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #152by Lafuente_Astronomy » 30.09.2019, 15:35

pirogronian wrote:Changelog update:
* Added Lua interface for names manipulation. It means user is now able to add and remove names of objects from Lua. Names local tova planetary system aren't supported yet.
* ...and somw bugfixes related to it.
* I started new branch as a merge proxy between master and AstroDb. It's still local, but you may notice recent commits in astrodb focused on avoiding name conflicts. It's my another try to merge it with possibly painless way. Perhaps many other changes could be done yet, but it become extremly difficult to maintain such a big branch separately. I'm only praying to God for @onetwothree acceptance, when it will become soon a pull request... :wink:

Amen to that, brother! I mean, the updates do look good in all parts. So, does that mean I can add any names to objects other than stars? Because so far, I can only add names to stars through the starnames.dat file. Also, do you mind sharing the link to the AstroDB's github here?
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.

Topic author
pirogronian
Developer
Posts: 200
Joined: 05.01.2018
Age: 33
With us: 1 year 10 months
Location: Wrocław
Contact:

Post #153by pirogronian » 30.09.2019, 16:25

Lafuente_Astronomy wrote:So, does that mean I can add any names to objects other than stars? Because so far, I can only add names to stars through the starnames.dat. Also, do you mind sharing the link to the AstroDB's github here?

Yes, You can add any name to any object: DSO, body, even Location. All

object:addname(string canonical, string nls-domain, bool greek) : bool
or
object:addalias(string canonical, string nls-domain, bool greek) : bool

Second argument is a local directory name, where gettext translations are placed. Default is null.
Third argument is flag whenever to replace greek abbreviations by ordinary greek letters. Default is true.
Difference between functions is the first one place added name as "primary" one, returned by getName method.
Both methods returns true on success, false otherwise.

To remove name, call
object:removename(string canonical/nameobject name, bool greek) : bool

First parameter is canonical name string or "name object" (see below).

To list all objects' names (but not catalog numbers):
object:getnames() : table

This method return table of name objects. Name objects is new type, representing name, its translation and context. Methods:
name:getcanonical() - get canonical name
name:getlocalized() - get translated name
name:getobject() - get object name belongs to.

For anyone who wants to test - AstroDB branch is where it was from beginning, and here is a link: https://github.com/CelestiaProject/Celestia/tree/astrodb

Avatar
Lafuente_Astronomy
Moderator
Posts: 436
Joined: 04.08.2018
Age: 21
With us: 1 year 3 months
Location: Cebu City, Cebu Province, Philippines
Contact:

Post #154by Lafuente_Astronomy » 01.10.2019, 13:01

Those sound quiet complicated. But I'll try them nontheless. Thanks a lot
Official Administrator of the Celestia Discord Server.
Invite: https://discordapp.com/invite/WEWDcJh
If you don't have a Discord account, register here: https://discordapp.com/register
Have a blessed day.


Return to “Development”

Who is online