Skip to content

Commit b3b12cb

Browse files
committed
Fix power limit UI and add corrected i18n labels
Two fixes: 1. Fixed data-setting attribute (bug fix) - Changed data-setting-placeholder to data-setting on all 8 fields - Settings.saveInputs() only processes data-setting attributes - This was preventing values from being saved 2. Fixed duplicate labels (UX improvement) - "Burst Time" → "Burst Current Time" / "Burst Power Time" - "Burst Falldown Time" → "Burst Current Falldown Time" / "Burst Power Falldown Time" - Eliminates confusion between current and power timing fields Note: i18n strings only added to English (en). Other languages (ja, ru, uk, zh_CN) will fall back to English until proper translations are provided.
1 parent 227030f commit b3b12cb

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

locale/en/messages.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,13 +1099,13 @@
10991099
"message": "Higher current allowed for short bursts (punch-outs, climbs). Example: 750 = 75A. Should be >= continuous limit."
11001100
},
11011101
"configurationLimitBurstCurrentTime": {
1102-
"message": "Burst Time (ds)"
1102+
"message": "Burst Current Time (ds)"
11031103
},
11041104
"configurationLimitBurstCurrentTimeHelp": {
11051105
"message": "Duration burst current is allowed in deci-seconds (ds). Example: 100 = 10 seconds. After this time, limit falls to continuous."
11061106
},
11071107
"configurationLimitBurstCurrentFalldownTime": {
1108-
"message": "Burst Falldown Time (ds)"
1108+
"message": "Burst Current Falldown Time (ds)"
11091109
},
11101110
"configurationLimitBurstCurrentFalldownTimeHelp": {
11111111
"message": "Smooth ramp-down time from burst to continuous limit in deci-seconds (ds). Example: 20 = 2 seconds."
@@ -1123,13 +1123,13 @@
11231123
"message": "Higher power allowed for short bursts. Example: 10000 = 1000W. Should be >= continuous limit."
11241124
},
11251125
"configurationLimitBurstPowerTime": {
1126-
"message": "Burst Time (ds)"
1126+
"message": "Burst Power Time (ds)"
11271127
},
11281128
"configurationLimitBurstPowerTimeHelp": {
11291129
"message": "Duration burst power is allowed in deci-seconds (ds). Example: 50 = 5 seconds."
11301130
},
11311131
"configurationLimitBurstPowerFalldownTime": {
1132-
"message": "Burst Falldown Time (ds)"
1132+
"message": "Burst Power Falldown Time (ds)"
11331133
},
11341134
"configurationLimitBurstPowerFalldownTimeHelp": {
11351135
"message": "Smooth ramp-down time from burst to continuous power limit in deci-seconds (ds). Example: 10 = 1 second."

tabs/configuration.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,28 +211,28 @@
211211

212212
<!-- Current Limits -->
213213
<div class="number">
214-
<input type="number" class="batteryProfileHighlight" id="limit_cont_current" name="limit_cont_current" step="1" min="0" max="2000" data-setting-placeholder="limit_cont_current" />
214+
<input type="number" class="batteryProfileHighlight" id="limit_cont_current" name="limit_cont_current" step="1" min="0" max="2000" data-setting="limit_cont_current" />
215215
<label for="limit_cont_current">
216216
<span data-i18n="configurationLimitContCurrent"></span>
217217
</label>
218218
<div for="limit_cont_current" class="helpicon cf_tip" data-i18n_title="configurationLimitContCurrentHelp"></div>
219219
</div>
220220
<div class="number">
221-
<input type="number" class="batteryProfileHighlight" id="limit_burst_current" name="limit_burst_current" step="1" min="0" max="2000" data-setting-placeholder="limit_burst_current" />
221+
<input type="number" class="batteryProfileHighlight" id="limit_burst_current" name="limit_burst_current" step="1" min="0" max="2000" data-setting="limit_burst_current" />
222222
<label for="limit_burst_current">
223223
<span data-i18n="configurationLimitBurstCurrent"></span>
224224
</label>
225225
<div for="limit_burst_current" class="helpicon cf_tip" data-i18n_title="configurationLimitBurstCurrentHelp"></div>
226226
</div>
227227
<div class="number">
228-
<input type="number" class="batteryProfileHighlight" id="limit_burst_current_time" name="limit_burst_current_time" step="1" min="0" max="600" data-setting-placeholder="limit_burst_current_time" />
228+
<input type="number" class="batteryProfileHighlight" id="limit_burst_current_time" name="limit_burst_current_time" step="1" min="0" max="600" data-setting="limit_burst_current_time" />
229229
<label for="limit_burst_current_time">
230230
<span data-i18n="configurationLimitBurstCurrentTime"></span>
231231
</label>
232232
<div for="limit_burst_current_time" class="helpicon cf_tip" data-i18n_title="configurationLimitBurstCurrentTimeHelp"></div>
233233
</div>
234234
<div class="number">
235-
<input type="number" class="batteryProfileHighlight" id="limit_burst_current_falldown_time" name="limit_burst_current_falldown_time" step="1" min="0" max="600" data-setting-placeholder="limit_burst_current_falldown_time" />
235+
<input type="number" class="batteryProfileHighlight" id="limit_burst_current_falldown_time" name="limit_burst_current_falldown_time" step="1" min="0" max="600" data-setting="limit_burst_current_falldown_time" />
236236
<label for="limit_burst_current_falldown_time">
237237
<span data-i18n="configurationLimitBurstCurrentFalldownTime"></span>
238238
</label>
@@ -241,28 +241,28 @@
241241

242242
<!-- Power Limits -->
243243
<div class="number">
244-
<input type="number" class="batteryProfileHighlight" id="limit_cont_power" name="limit_cont_power" step="1" min="0" max="20000" data-setting-placeholder="limit_cont_power" />
244+
<input type="number" class="batteryProfileHighlight" id="limit_cont_power" name="limit_cont_power" step="1" min="0" max="20000" data-setting="limit_cont_power" />
245245
<label for="limit_cont_power">
246246
<span data-i18n="configurationLimitContPower"></span>
247247
</label>
248248
<div for="limit_cont_power" class="helpicon cf_tip" data-i18n_title="configurationLimitContPowerHelp"></div>
249249
</div>
250250
<div class="number">
251-
<input type="number" class="batteryProfileHighlight" id="limit_burst_power" name="limit_burst_power" step="1" min="0" max="20000" data-setting-placeholder="limit_burst_power" />
251+
<input type="number" class="batteryProfileHighlight" id="limit_burst_power" name="limit_burst_power" step="1" min="0" max="20000" data-setting="limit_burst_power" />
252252
<label for="limit_burst_power">
253253
<span data-i18n="configurationLimitBurstPower"></span>
254254
</label>
255255
<div for="limit_burst_power" class="helpicon cf_tip" data-i18n_title="configurationLimitBurstPowerHelp"></div>
256256
</div>
257257
<div class="number">
258-
<input type="number" class="batteryProfileHighlight" id="limit_burst_power_time" name="limit_burst_power_time" step="1" min="0" max="600" data-setting-placeholder="limit_burst_power_time" />
258+
<input type="number" class="batteryProfileHighlight" id="limit_burst_power_time" name="limit_burst_power_time" step="1" min="0" max="600" data-setting="limit_burst_power_time" />
259259
<label for="limit_burst_power_time">
260260
<span data-i18n="configurationLimitBurstPowerTime"></span>
261261
</label>
262262
<div for="limit_burst_power_time" class="helpicon cf_tip" data-i18n_title="configurationLimitBurstPowerTimeHelp"></div>
263263
</div>
264264
<div class="number">
265-
<input type="number" class="batteryProfileHighlight" id="limit_burst_power_falldown_time" name="limit_burst_power_falldown_time" step="1" min="0" max="600" data-setting-placeholder="limit_burst_power_falldown_time" />
265+
<input type="number" class="batteryProfileHighlight" id="limit_burst_power_falldown_time" name="limit_burst_power_falldown_time" step="1" min="0" max="600" data-setting="limit_burst_power_falldown_time" />
266266
<label for="limit_burst_power_falldown_time">
267267
<span data-i18n="configurationLimitBurstPowerFalldownTime"></span>
268268
</label>

0 commit comments

Comments
 (0)