Skip to content

Commit

Permalink
nit re #10541, use more i18n'able header string
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Apr 25, 2024
1 parent 955508c commit 7255261
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions arches/app/src/components/ControlledListManager/ListHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,29 @@ const { $gettext } = useGettext();
const slateBlue = "#2d3c4b"; // todo: import from theme somewhere
const props: {
displayedList: ControlledList;
displayedList: ControlledList | null;
isItemEditor: boolean;
} = defineProps([
"displayedList",
"isItemEditor",
]);
const heading = computed(() => {
const prefix = props.isItemEditor ? $gettext("List Item Editor") : $gettext("List Editor");
return (
prefix + (props.displayedList ? " > " + props.displayedList.name : "")
);
if (props.isItemEditor) {
return $gettext(
"List Item Editor > %{itemName}",
{ itemName: props.displayedList!.name },
);
} else {
if (props.displayedList) {
return $gettext(
"List Editor > %{listName}",
{ listName: props.displayedList.name},
);
} else {
return $gettext("List Editor");
}
}
});
</script>

Expand Down

0 comments on commit 7255261

Please sign in to comment.