Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline mkraska  
#1 Posted : 02 July 2013 12:36:37(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Here is an extended units.xml. Please make this a base for future SMath releases. In order to to so, some handwork is required:
- Create a unit category "Quantity", where things like "%", "dozen", "billion" go
- Set the correct category for the corresponding units (currently marked as "All" )
- provide slots in the language files for the newly introduced units (now have plain english description attributes instead of slot numbers)
- possibly add more stuff...

For now, you can use the new units but keep in mind, that these might not be known on other installations. Using snippets is safer with respect to sheet portability, update of units.xml is the mid (or whatever Andrey decides) term solution.

In order to create awareness for the compatibility issue, the new units are marked as [inofficial] in the units dialog and in the dynamic assistant. The use of translated, yet previously existing units is safe, these just fall back to english with standard units.xml files.

What the new units.xml provides:
- Some new units, most of them being quantity representations.
- Some translations of unit names or symbols to german. Thus you now have the choice "Deutsch" in the units language setting.

Edited by user 27 March 2014 16:33:46(UTC)  | Reason: Not specified

File Attachment(s):
Neue Einheiten.sm (37kb) downloaded 44 time(s).
Units.zip (5kb) downloaded 37 time(s).
mkraska attached the following image(s):
unitnew.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
thanks 2 users thanked mkraska for this useful post.
on 02/07/2013(UTC),  on 03/07/2013(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline mkraska  
#2 Posted : 02 July 2013 17:05:22(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
This is how I understand the options of units.xml so far:

- units can have multiple representations per language, example is "deg" and "°" for degrees (angular units). If you use them in english unit language setting, then they are saved correctly.

- If you define alternative german representations like "°" and "Grad", then always the same english version is saved, such that upon loading the document, you have all one unit (the first definition for the current language setting in. Thus, whenever you want to save different versions of a unit, then they need to belong to different english versions.

- You can define units without providing english versions. Example: "Morgen". They are then saved in the german version or whatever is available.

- You cannot have different units with the same english name, but you can have different english names for the same unit. This is sort of advantage for english, as the use of different english versions of the same unit survives save/reload, whereas for other languages they do not.

- It might be possible to re-define the base units. I am not going to try that, because I am happy with the metric system and messing around without solid knowledge of the internal logic is a nightmare of trial and error.

In order to get more insight and make modifications more robust, as many as possible people should try the modified units.xml posted above.
This shall become part of the inofficial distribution with the next release.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Andrey Ivashov  
#3 Posted : 03 July 2013 23:20:24(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
mkraska Offline , great to have units localized to German!

I've checked updated Units.xml you've attached and want to mention about one thing: it is not correct to specify different UNIT tags with the same VALUE attribute. I understand why you did it, but this approach is not acceptible for release (I must think how to make saving of localized units better).

Please, could you fix this and then I will include this new Units.xml into SMath Studio packages.

Thank you again! Best regards!
thanks 1 user thanked Andrey Ivashov for this useful post.
on 04/07/2013(UTC)
Offline mkraska  
#4 Posted : 04 July 2013 00:49:44(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
Originally Posted by: smath Go to Quoted Post
it is not correct to specify different UNIT tags with the same VALUE attribute.

First I had the idea to just change the 15th mantissa position of the value attribute, but then thougth that this dirty engineering approach (minimal effort, no loss of features) would not be overly welcome by the math community.

Thus I sacrified multiple german unit names for the sake of acceptance in the distribution.
File Attachment(s):
Units.zip (5kb) downloaded 30 time(s).
Neue Einheiten.sm (36kb) downloaded 27 time(s).
mkraska attached the following image(s):
newunits.PNG
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.