Skip to content

Commit

Permalink
Merge pull request #6920 from ykiu/translate-table-styling-workflow
Browse files Browse the repository at this point in the history
I18nify TableStylingWorkflow and its related components
  • Loading branch information
nf-s authored Oct 10, 2023
2 parents d93a0a7 + 6f318b3 commit 89f4ca2
Show file tree
Hide file tree
Showing 10 changed files with 1,762 additions and 216 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#### next release (8.3.7)

- Allow translation of TableStylingWorkflow.
- Fix "Remove all" not removing selected/picked features
- [The next improvement]

Expand Down
13 changes: 7 additions & 6 deletions lib/ModelMixins/TableMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {
...super.viewingControls,
{
id: TableStylingWorkflow.type,
name: "Edit Style",
name: i18next.t("models.tableData.editStyle"),
onClick: action((viewState) =>
SelectableDimensionWorkflow.runWorkflow(
viewState,
Expand Down Expand Up @@ -493,7 +493,7 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {
return {
type: "select",
id: "activeStyle",
name: "Display Variable",
name: i18next.t("models.tableData.activeStyle"),
options: this.tableStyles
.filter((style) => !style.hidden || this.activeStyle === style.id)
.map((style) => {
Expand Down Expand Up @@ -531,7 +531,7 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {

return {
id: "regionMapping",
name: "Region Mapping",
name: i18next.t("models.tableData.regionMapping"),
options: allRegionProviders.map((regionProvider) => {
return {
name: regionProvider.description,
Expand Down Expand Up @@ -577,7 +577,7 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {

return {
id: "regionColumn",
name: "Region Column",
name: i18next.t("models.tableData.regionColumn"),
options: this.tableColumns.map((col) => {
return {
name: col.name,
Expand All @@ -596,7 +596,8 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {

@computed get regionMappingDimensions(): SelectableDimensionGroup {
return {
id: "Manual Region Mapping",
id: "manual-region-mapping",
name: i18next.t("models.tableData.manualRegionMapping"),
type: "group",
selectableDimensions: filterOutUndefined([
this.regionColumnDimensions,
Expand Down Expand Up @@ -718,7 +719,7 @@ function TableMixin<T extends AbstractConstructor<BaseType>>(Base: T) {
@computed get legendButton() {
return this.activeTableStyle.isCustom
? {
title: "Custom",
title: i18next.t("models.tableData.custom"),
onClick: action(() => {
SelectableDimensionWorkflow.runWorkflow(
this.terria,
Expand Down
Loading

0 comments on commit 89f4ca2

Please sign in to comment.