Units update - Proposal for added units and german translations

Units update - Proposal for added units and german translations - BTS issue SS-53 - Сообщения

#1 Опубликовано: 02.07.2013 05:36:37
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

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.
unitnew.PNG
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 пользователям понравился этот пост
Davide Carpi 02.07.2013 06:37:00, Andrey Ivashov 03.07.2013 15:57:00
#2 Опубликовано: 02.07.2013 10:05:22
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

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://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Опубликовано: 03.07.2013 16:20:24
Andrey Ivashov

Andrey Ivashov

2269 сообщений из 3729 понравились пользователям.

Группа: Super Administrator

[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!
1 пользователям понравился этот пост
Martin Kraska 03.07.2013 18:16:00
#4 Опубликовано: 03.07.2013 17:49:44
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Wrote

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.
Neue Einheiten.sm (35 КиБ) скачан 40 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений