Skip to content

Commit

Permalink
attempt to fix i18n (#5619)
Browse files Browse the repository at this point in the history
maybe closes #5542
  • Loading branch information
mifi authored Jan 23, 2025
1 parent 8f53f6a commit aee5e12
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class GoogleDrivePicker<M extends Meta, B extends Body>

this.defaultLocale = locale
this.i18nInit()
this.title = this.i18n('pluginNameGoogleDrive')
this.title = this.i18n('pluginNameGoogleDrivePicker')

const client = new RequestClient(uppy, {
pluginId: this.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/google-drive-picker/src/locale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
strings: {
pluginNameGoogleDrive: 'Google Drive',
pluginNameGoogleDrivePicker: 'Google Drive',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class GooglePhotosPicker<M extends Meta, B extends Body>

this.defaultLocale = locale
this.i18nInit()
this.title = this.i18n('pluginNameGooglePhotos')
this.title = this.i18n('pluginNameGooglePhotosPicker')

const client = new RequestClient(uppy, {
pluginId: this.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/google-photos-picker/src/locale.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
strings: {
pluginNameGooglePhotos: 'Google Photos',
pluginNameGooglePhotosPicker: 'Google Photos',
},
}
2 changes: 2 additions & 0 deletions packages/@uppy/locales/src/en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ en_US.strings = {
pluginNameFacebook: 'Facebook',
pluginNameGoogleDrive: 'Google Drive',
pluginNameGooglePhotos: 'Google Photos',
pluginNameGoogleDrivePicker: 'Google Drive',
pluginNameGooglePhotosPicker: 'Google Photos',
pluginNameInstagram: 'Instagram',
pluginNameOneDrive: 'OneDrive',
pluginNameScreenCapture: 'Screencast',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ export default function GooglePickerView({
<AuthView
pluginName={
pickerType === 'drive' ?
uppy.i18n('pluginNameGoogleDrive')
: uppy.i18n('pluginNameGooglePhotos')
uppy.i18n('pluginNameGoogleDrivePicker')
: uppy.i18n('pluginNameGooglePhotosPicker')
}
pluginIcon={pickerType === 'drive' ? GoogleDriveIcon : GooglePhotosIcon}
handleAuth={showPicker}
Expand Down

0 comments on commit aee5e12

Please sign in to comment.