Bug 35374 - Translations contain config from ERM/data providers
Summary: Translations contain config from ERM/data providers
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 34587
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-21 10:41 UTC by Katrin Fischer
Modified: 2023-11-22 18:50 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 35374: Remove ES6 template literals to fix translation strings (1.57 KB, patch)
2023-11-21 12:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35374: Remove ES6 template literals to fix translation strings (1.65 KB, patch)
2023-11-21 17:26 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 35374: Remove ES6 template literals to fix translation strings (1.64 KB, patch)
2023-11-22 14:23 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 35374: Remove ES6 template literals to fix translation strings (1.69 KB, patch)
2023-11-22 14:25 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-11-21 10:41:04 UTC
https://translate.koha-community.org/translate/koha/master/messages-js/de/?checksum=a8b31c9919434571

This shouldn't appear in translations:


            return url
        },
        getTableColumns() {
            const column_options = [
                {
                    used_by: ["title", "platform", "item", "database"],
                    column: {
                        title: __(
                            this.data_type.charAt(0).toUpperCase() +
                                this.data_type.slice(1)
                        ),
                        data: this.data_type,
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["item", "database", "platforms"],
                    column: {
                        title: "Platform",
                        data: "platform",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title", "item", "database"],
                    column: {
                        title: "Publisher",
                        data: "publisher",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title", "database"],
                    column: {
                        title: "Publisher ID",
                        data: "publisher_id",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title"],
                    column: {
                        title: "DOI",
                        data: "title_doi",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title"],
                    column: {
                        title: "Print ISSN",
                        data: "print_issn",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title"],
                    column: {
                        title: "Online ISSN",
                        data: "online_issn",
                        searchable: true,
                        orderable: true,
                    },
                },
                {
                    used_by: ["title"],
                    column: {
                        title: "URI",
                        data: "title_uri",
                        searchable: true,
                        orderable: true,
                    },
                },
            ]
            const columns = column_options
                .filter(column => column.used_by.includes(this.data_type))
                .map(result => result.column)
            return columns
        },
    },
    mounted() {
        if (!this.building_table) {
            this.building_table = true
            this.getData()
        }
    },
    props: ["data_type"],
    components: { KohaTable },
    name: "UsageStatisticsProviderDataList",
}
</script>

<style scoped>
#title_list {
    display: table;
}
</style>
Comment 1 Jonathan Druart 2023-11-21 12:42:16 UTC
Created attachment 159155 [details] [review]
Bug 35374: Remove ES6 template literals to fix translation strings

The .po files contains the whole block after this line. I don't really
understand what's happening but this change fixes the problem.

Test plan:
1. Run the following command before and after the patch and compare the
diff
% gulp po:update --lang de-DE --task messages-js
2. Confirm that the list on this vue is correctly populated
Comment 2 Matt Blenkinsop 2023-11-21 17:26:52 UTC
Created attachment 159172 [details] [review]
Bug 35374: Remove ES6 template literals to fix translation strings

The .po files contains the whole block after this line. I don't really
understand what's happening but this change fixes the problem.

Test plan:
1. Run the following command before and after the patch and compare the
diff
% gulp po:update --lang de-DE --task messages-js
2. Confirm that the list on this vue is correctly populated

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 3 David Nind 2023-11-21 18:56:25 UTC
Matt, you need to change the status as you have signed it off.

I would do it, but then you wouldn't get the credit on the dashboard 8-)
Comment 4 Matt Blenkinsop 2023-11-21 19:54:31 UTC
Good spot, forgot to do the attach -e!
Comment 5 Tomás Cohen Arazi 2023-11-22 14:23:58 UTC
Created attachment 159194 [details] [review]
Bug 35374: Remove ES6 template literals to fix translation strings

The .po files contains the whole block after this line. I don't really
understand what's happening but this change fixes the problem.

Test plan:
1. Run the following command before and after the patch and compare the
diff
% gulp po:update --lang de-DE --task messages-js
2. Confirm that the list on this vue is correctly populated

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 6 Tomás Cohen Arazi 2023-11-22 14:25:04 UTC
Created attachment 159195 [details] [review]
Bug 35374: Remove ES6 template literals to fix translation strings

The .po files contains the whole block after this line. I don't really
understand what's happening but this change fixes the problem.

Test plan:
1. Run the following command before and after the patch and compare the
diff
% gulp po:update --lang de-DE --task messages-js
2. Confirm that the list on this vue is correctly populated

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi 2023-11-22 14:39:24 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-11-22 18:49:50 UTC
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsProviderDataList.vue created by Bug 34587
Comment 9 Fridolin Somers 2023-11-22 18:50:47 UTC
Bug 34587 not in 23.05.x