mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
NSectionEditor: fix i18n for location
This commit is contained in:
@@ -307,11 +307,16 @@ NBox {
|
||||
var section = root.availableSections[i];
|
||||
if (section !== root.sectionId) {
|
||||
var label = root.getSectionLabel(section);
|
||||
// Capitalize first letter
|
||||
var capitalizedLabel = label.charAt(0).toUpperCase() + label.slice(1);
|
||||
var displayLabel = I18n.tr("positions." + section);
|
||||
|
||||
// If translation missing (returns key), fallback to capitalized label
|
||||
if (displayLabel === "positions." + section) {
|
||||
displayLabel = label.charAt(0).toUpperCase() + label.slice(1);
|
||||
}
|
||||
|
||||
items.push({
|
||||
"label": I18n.tr("tooltips.move-to-section", {
|
||||
"section": capitalizedLabel
|
||||
"section": displayLabel
|
||||
}),
|
||||
"action": section,
|
||||
"icon": root.getSectionIcon(section),
|
||||
|
||||
Reference in New Issue
Block a user