Comments (9)
The plurals here have 5 fields, but full spec is 6 fields {{zero, one, two, few, many, other}}
, see https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/runtime#plural
But not all are used, language specific it is matched to fewer cases: https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html
For sk we have {{one, few, may, others}}
, with few
matches 2-4, many
matches flowts and others
matches 0 and 5-up
Please check with 4 cases or use all 6.
Tested: 4 does not work, we have to use all 6 cases. As we have only int numbers, the many
does not matter here, we have only to add the other
for 5 and up.
NUM_DEVICES: '{num} Zariaden{{í|ie|ia|ia|í|í}}',
NUM_TEMP_SENSORS: '{num} Teplotn{{ých|ý|é|é|ých|ých}} sníma{{čov|č|če|če|čov|čov}}',
NUM_ANALOG_SENSORS: '{num} Analogov{{ých|ý|é|é|ých|ých}} sníma{{čov|č|če|če|čov|čov}}',
NUM_DAYS: '{num} d{{ní|eň|ní|ní|ní|ní}}',
NUM_SECONDS: '{num} sek{{únd|unda|undy|undy|únd|únd}}',
NUM_HOURS: '{num} hod{{ín|ina|iny|iny|ín|ín}}',
NUM_MINUTES: '{num} minú{{t|ta|ty|ty|t|t}}',
from ems-esp32.
Good work.
Embedded. index.ts.SK2.txt
from ems-esp32.
Seems the new pluralization here:
EMS-ESP32/interface/src/i18n/sk/index.ts
Lines 94 to 100 in 8ef8eeb
is wrong. Can you help to fix it?
In dev-build it is:
EMS-ESP32/interface/src/i18n/sk/index.ts
Lines 94 to 100 in 6cab020
from ems-esp32.
I tried this too, but it also didn't work.
So I solved it my way.
NUM_DEVICES: 'Zariadenia - {num} ',
NUM_TEMP_SENSORS: 'Teplotné snímače - {num} ',
NUM_ANALOG_SENSORS: 'Analógové snímače - {num} ',
NUM_DAYS: '{num} d.',
NUM_SECONDS: '{num} sek.',
NUM_HOURS: '{num} hod.',
NUM_MINUTES: '{num} min.',
I slightly adjusted the SK translations.
Nothing major, it just reads better.
from ems-esp32.
These plurals
NUM_DEVICES: '{num} Zariaden{{í|ie|ia|ia|í}}',
NUM_TEMP_SENSORS: '{num} Teplotn{{ých|ý|é|é|ých}} snímač{{ov||e|e|ov}}',
NUM_ANALOG_SENSORS: '{num} Analogov{ých|ý|é|é|ých}} snímač{{ov||e|e|ov}}',
NUM_DAYS: '{num} d{{ní|eň|ní|ní|ní}}',
NUM_SECONDS: '{num} sek{{únd|unda|undy|undy|únd}}',
NUM_HOURS: '{num} hod{{ín|ina|iny|iny|ín}}',
NUM_MINUTES: '{num} minú{{t|ta|ty|ty|t}}',
should be correct. I don't know why it doesn't work.
In the Polish translation it is functional.
NUM_DEVICES: '{num} urządze{{ń|nie|nia|nia|ń}} EMS',
NUM_TEMP_SENSORS: '{num} czujni{{ków|k|ki|ki|ków}} temperatury',
NUM_ANALOG_SENSORS: '{num} inn{{ych|e|e|e|ych}} urządze{{ń|nie|nia(two)|nia|ń}} podłączon{{ych|e|e|e|ych}} do EMS-ESP',
NUM_DAYS: '{num} d{{ni|zień|ni|ni|ni}}',
NUM_SECONDS: '{num} sekun{{d|da|dy|dy|d}}',
NUM_HOURS: '{num} godzi{{n|na|ny|ny|n}}',
NUM_MINUTES: '{num} minu{{t|ta|ty|ty|t}}',
from ems-esp32.
It does not like the empty field, it's working with:
NUM_TEMP_SENSORS: '{num} Teplotn{{ých|ý|é|é|ých}} sníma{{čov|č|če|če|čov}}',
NUM_ANALOG_SENSORS: '{num} Analogov{ých|ý|é|é|ých}} sníma{{čov|č|če|če|čov}}',
from ems-esp32.
So there was a dog buried here.
Moreover was missing there one compound parenthesis
...Analogov{ých...
...Analogov{{ých...
Now it doesn't throw the error anymore.
But ...
- 0 sekúnd - OK
- 1 sekunda - OK
- 2 sekundy - OK
- 3 sekundy - OK
- 4 sekundy - OK
- 5 sek - NO OK
- 6 sek - NO OK
etc, etc
It will probably be the same with other plurals.
I tried to transcribe this part of the translation from the Polish translation.
Same error. 0-1-2-3-4 OK, 5 or more NO OK.
from ems-esp32.
Could this be a bug in the i18n library that we should report? or is the "dog" somewhere else?
from ems-esp32.
@SoftVienka Your latest changes are now in the official dev, please check and close this issue if ok.
from ems-esp32.
Related Issues (20)
- Feature: Modbus Support HOT 39
- Automation Homeassistant - boiler disinfection HOT 2
- Platform mqtt does not generate unique IDs. For ID boiler_hysteresis_on_temperature and ID boiler_hysteresis_off_temperature HOT 3
- WebUI data missing on Firefox HOT 8
- boiler.nrgtotal with spikes and wrong value after update HOT 8
- Worcester-Bosch Greenstar Summer Mode temp value upper limit too low HOT 11
- Modbus UI not working correctly HOT 2
- No HTTP interface "ERR_CONNECTION_TIMED_OUT" HOT 1
- [emsesp] remotetemp timeout hc0, stop sending roomtemperature to thermostat HOT 14
- EMS bus disconnected HOT 2
- Connection problems HOT 1
- Feature: external modules HOT 8
- change “hc1 selected room temperature” in cooling mode not possible HOT 9
- Create specific builds for BBQKees Gateways HOT 1
- Wrong state_class in HomeAssistant HOT 2
- Setting thermostat/seltemp noit working with gui nor api HOT 19
- set the duration trigger of a shower HOT 9
- Supporting latest Arduino Core v3 - issues with fixed Network IP address, settings lost after upgrade etc HOT 29
- Feature: Conditions HOT 48
- Download for latest Beta not working 404 error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ems-esp32.