Skip to content

Commit

Permalink
fix(lang): correct strings for library sync button & user import toast (
Browse files Browse the repository at this point in the history
#1252)

* fix(lang): 'scan plex libraries' should actually be 'sync'

* fix(lang): also fix user import string in case of no imported users

* fix(lang): remove unused 'User Rating' strings
  • Loading branch information
TheCatLady committed Mar 21, 2021
1 parent 5f940c3 commit cb5ca7a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/components/MovieDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import StatusBadge from '../StatusBadge';

const messages = defineMessages({
releasedate: 'Release Date',
userrating: 'User Rating',
status: 'Status',
revenue: 'Revenue',
budget: 'Budget',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Settings/SettingsPlex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const messages = defineMessages({
plexlibraries: 'Plex Libraries',
plexlibrariesDescription:
'The libraries Overseerr scans for titles. Set up and save your Plex connection settings, then click the button below if no libraries are listed.',
scanning: 'Scanning…',
scan: 'Scan Plex Libraries',
scanning: 'Syncing…',
scan: 'Sync Libraries',
manualscan: 'Manual Library Scan',
manualscanDescription:
"Normally, this will only be run once every 24 hours. Overseerr will check your Plex server's recently added more aggressively. If this is your first time configuring Plex, a one-time full manual library scan is recommended!",
Expand Down
1 change: 0 additions & 1 deletion src/components/TvDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import StatusBadge from '../StatusBadge';
const messages = defineMessages({
firstAirDate: 'First Air Date',
nextAirDate: 'Next Air Date',
userrating: 'User Rating',
status: 'Status',
originallanguage: 'Original Language',
overview: 'Overview',
Expand Down
11 changes: 7 additions & 4 deletions src/components/UserList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const messages = defineMessages({
importfromplex: 'Import Users from Plex',
importfromplexerror: 'Something went wrong while importing users from Plex.',
importedfromplex:
'{userCount, plural, =0 {No new users} one {# new user} other {# new users}} imported from Plex successfully!',
'{userCount, plural, one {# new user} other {# new users}} imported from Plex successfully!',
nouserstoimport: 'No new users to import from Plex.',
user: 'User',
totalrequests: 'Total Requests',
accounttype: 'Account Type',
Expand Down Expand Up @@ -171,9 +172,11 @@ const UserList: React.FC = () => {
'/api/v1/user/import-from-plex'
);
addToast(
intl.formatMessage(messages.importedfromplex, {
userCount: createdUsers.length,
}),
createdUsers.length
? intl.formatMessage(messages.importedfromplex, {
userCount: createdUsers.length,
})
: intl.formatMessage(messages.nouserstoimport),
{
autoDismiss: true,
appearance: 'success',
Expand Down
9 changes: 4 additions & 5 deletions src/i18n/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"components.MovieDetails.status": "Status",
"components.MovieDetails.studio": "{studioCount, plural, one {Studio} other {Studios}}",
"components.MovieDetails.unavailable": "Unavailable",
"components.MovieDetails.userrating": "User Rating",
"components.MovieDetails.view": "View",
"components.MovieDetails.viewfullcrew": "View Full Crew",
"components.MovieDetails.watchtrailer": "Watch Trailer",
Expand Down Expand Up @@ -599,8 +598,8 @@
"components.Settings.regionTip": "Filter content by regional availability",
"components.Settings.save": "Save Changes",
"components.Settings.saving": "Saving…",
"components.Settings.scan": "Scan Plex Libraries",
"components.Settings.scanning": "Scanning",
"components.Settings.scan": "Sync Libraries",
"components.Settings.scanning": "Syncing",
"components.Settings.serverConnected": "connected",
"components.Settings.serverLocal": "local",
"components.Settings.serverRemote": "remote",
Expand Down Expand Up @@ -693,7 +692,6 @@
"components.TvDetails.similar": "Similar Series",
"components.TvDetails.status": "Status",
"components.TvDetails.unavailable": "Unavailable",
"components.TvDetails.userrating": "User Rating",
"components.TvDetails.viewfullcrew": "View Full Crew",
"components.TvDetails.watchtrailer": "Watch Trailer",
"components.UserList.accounttype": "Account Type",
Expand All @@ -711,12 +709,13 @@
"components.UserList.edit": "Edit",
"components.UserList.edituser": "Edit User Permissions",
"components.UserList.email": "Email Address",
"components.UserList.importedfromplex": "{userCount, plural, =0 {No new users} one {# new user} other {# new users}} imported from Plex successfully!",
"components.UserList.importedfromplex": "{userCount, plural, one {# new user} other {# new users}} imported from Plex successfully!",
"components.UserList.importfromplex": "Import Users from Plex",
"components.UserList.importfromplexerror": "Something went wrong while importing users from Plex.",
"components.UserList.lastupdated": "Last Updated",
"components.UserList.localuser": "Local User",
"components.UserList.next": "Next",
"components.UserList.nouserstoimport": "No new users to import from Plex.",
"components.UserList.owner": "Owner",
"components.UserList.password": "Password",
"components.UserList.passwordinfo": "Password Information",
Expand Down

0 comments on commit cb5ca7a

Please sign in to comment.