Skip to content

Commit

Permalink
fix: handle addons that have not been migrated to the new structure o… (
Browse files Browse the repository at this point in the history
plone#5704)

Co-authored-by: Victor Fernandez de Alba <[email protected]>
  • Loading branch information
erral and sneridagh authored Jan 26, 2024
1 parent 4bb07b9 commit f28e8c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
5 changes: 4 additions & 1 deletion packages/scripts/i18n.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ function poToJson({ registry, addonMode }) {
result[item.msgid] =
language === 'en'
? item.msgstr[0] ||
(item.comments[0]
(item.comments[0] && item.comments[0].startsWith('. Default: ')
? item.comments[0].replace('. Default: ', '')
: item.comments[0] &&
item.comments[0].startsWith('defaultMessage:')
? item.comments[0].replace('defaultMessage: ', '')
: '')
: item.msgstr[0];
}
Expand Down
1 change: 1 addition & 0 deletions packages/scripts/news/5704.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
handle addons that have not been migrated to the new structure of po files @erral
15 changes: 2 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f28e8c3

Please sign in to comment.