1 Pages (4 items)
Units update - Proposal for added units and german translations - BTS issue SS-53 - Messages
#1 Posted: 7/2/2013 5:36:37 AM
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.

- 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.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
#2 Posted: 7/2/2013 10:05:22 AM
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.
- 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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Posted: 7/3/2013 4:20:24 PM
[USERLINK]mkraska[/USERLINK], 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!
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!
1 users liked this post
Martin Kraska 7/3/2013 6:16:00 PM
#4 Posted: 7/3/2013 5:49:44 PM
Wroteit 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.
Neue Einheiten.sm (35 KiB) downloaded 42 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 Pages (4 items)
-
New Posts
-
No New Posts