File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
src/components/LanguagePicker Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,11 @@ export const useLanguagePicker = (
88
88
const targetName = i18nConfigTarget || fallbackTarget
89
89
90
90
if ( ! sourceName || ! targetName ) {
91
- throw new Error (
92
- "Missing language display name, locale: " + localeOption
93
- )
91
+ console . warn ( "Missing language display name:" , {
92
+ localeOption,
93
+ sourceName,
94
+ targetName,
95
+ } )
94
96
}
95
97
96
98
// English will not have a dataItem
@@ -106,10 +108,9 @@ export const useLanguagePicker = (
106
108
( dataItem ! . words . approved / dataItem ! . words . total ) * 100
107
109
) || 0
108
110
109
- if ( progressData . length === 0 )
110
- throw new Error (
111
- "Missing translation progress data; check GitHub action"
112
- )
111
+ if ( progressData . length === 0 ) {
112
+ console . warn ( "Missing translation progress data; check GitHub action" )
113
+ }
113
114
114
115
const totalWords = progressData [ 0 ] . words . total
115
116
@@ -123,8 +124,8 @@ export const useLanguagePicker = (
123
124
return {
124
125
localeOption,
125
126
approvalProgress,
126
- sourceName,
127
- targetName,
127
+ sourceName : sourceName ?? "" ,
128
+ targetName : targetName ?? "" ,
128
129
englishName,
129
130
wordsApproved,
130
131
isBrowserDefault,
You can’t perform that action at this time.
0 commit comments