MM-13974 Missing translations (#2549)

* Missing translations

* update snapshots
This commit is contained in:
Elias Nahum
2019-02-05 19:15:31 -03:00
parent d40b1da1d0
commit 1ebf6fc0c2
6 changed files with 31 additions and 37 deletions

View File

@@ -19,6 +19,7 @@ import {debounce} from 'mattermost-redux/actions/helpers';
import ChannelItem from 'app/components/sidebars/main/channels_list/channel_item';
import {ListTypes} from 'app/constants';
import {SidebarSectionTypes} from 'app/constants/view';
import {t} from 'app/utils/i18n';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity} from 'app/utils/theme';
@@ -88,48 +89,48 @@ export default class List extends PureComponent {
switch (sectionType) {
case SidebarSectionTypes.UNREADS:
return {
id: 'mobile.channel_list.unreads',
id: t('mobile.channel_list.unreads'),
defaultMessage: 'UNREADS',
};
case SidebarSectionTypes.FAVORITE:
return {
id: 'sidebar.favorite',
id: t('sidebar.favorite'),
defaultMessage: 'FAVORITES',
};
case SidebarSectionTypes.PUBLIC:
return {
action: this.goToMoreChannels,
id: 'sidebar.channels',
id: t('sidebar.channels'),
defaultMessage: 'PUBLIC CHANNELS',
};
case SidebarSectionTypes.PRIVATE:
return {
action: canCreatePrivateChannels ? this.goToCreatePrivateChannel : null,
id: 'sidebar.pg',
id: t('sidebar.pg'),
defaultMessage: 'PRIVATE CHANNELS',
};
case SidebarSectionTypes.DIRECT:
return {
action: this.goToDirectMessages,
id: 'sidebar.direct',
id: t('sidebar.direct'),
defaultMessage: 'DIRECT MESSAGES',
};
case SidebarSectionTypes.RECENT_ACTIVITY:
return {
action: this.showCreateChannelOptions,
id: 'sidebar.types.recent',
id: t('sidebar.types.recent'),
defaultMessage: 'RECENT ACTIVITY',
};
case SidebarSectionTypes.ALPHA:
return {
action: this.showCreateChannelOptions,
id: 'mobile.channel_list.channels',
id: t('mobile.channel_list.channels'),
defaultMessage: 'CHANNELS',
};
default:
return {
action: this.showCreateChannelOptions,
id: 'mobile.channel_list.channels',
id: t('mobile.channel_list.channels'),
defaultMessage: 'CHANNELS',
};
}

View File

@@ -91,8 +91,8 @@ export default class EditProfile extends PureComponent {
rightButtons: [this.rightButton],
};
this.leftButton.title = context.intl.formatMessage({id: 'mobile.account.settings.cancel', defaultMessage: 'Cancel'});
this.rightButton.title = context.intl.formatMessage({id: 'mobile.account.settings.save', defaultMessage: 'Save'});
this.leftButton.title = context.intl.formatMessage({id: t('mobile.account.settings.cancel'), defaultMessage: 'Cancel'});
this.rightButton.title = context.intl.formatMessage({id: t('mobile.account.settings.save'), defaultMessage: 'Save'});
props.navigator.setOnNavigatorEvent(this.onNavigatorEvent);
props.navigator.setButtons(buttons);

View File

@@ -18,6 +18,7 @@ import {getFormattedFileSize} from 'mattermost-redux/utils/file_utils';
import SettingsItem from 'app/screens/settings/settings_item';
import StatusBar from 'app/components/status_bar';
import {t} from 'app/utils/i18n';
import {deleteFileCache, getFileCacheSize} from 'app/utils/file';
import {preventDoubleTap} from 'app/utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from 'app/utils/theme';
@@ -46,8 +47,8 @@ class AdvancedSettings extends PureComponent {
const {formatMessage} = this.props.intl;
Alert.alert(
formatMessage({id: 'mobile.advanced_settings.delete_title', defaultMessage: 'Delete Documents & Data'}),
formatMessage({id: 'mobile.advanced_settings.delete_message', defaultMessage: '\nThis will reset all offline data and restart the app. You will be automatically logged back in once the app restarts.\n'}),
formatMessage({id: t('mobile.advanced_settings.delete_title'), defaultMessage: 'Delete Documents & Data'}),
formatMessage({id: t('mobile.advanced_settings.delete_message'), defaultMessage: '\nThis will reset all offline data and restart the app. You will be automatically logged back in once the app restarts.\n'}),
[{
text: formatMessage({id: 'channel_modal.cancel', defaultMessage: 'Cancel'}),
style: 'cancel',

View File

@@ -45,10 +45,9 @@ exports[`Theme should match snapshot 1`] = `
isLandscape={false}
isTablet={false}
label={
<FormattedText
defaultMessage="Mattermost"
id="user.settings.display.Mattermost"
/>
<Text>
Mattermost
</Text>
}
selected={true}
theme={
@@ -91,10 +90,9 @@ exports[`Theme should match snapshot 1`] = `
isLandscape={false}
isTablet={false}
label={
<FormattedText
defaultMessage="Organization"
id="user.settings.display.Organization"
/>
<Text>
Organization
</Text>
}
selected={false}
theme={
@@ -137,10 +135,9 @@ exports[`Theme should match snapshot 1`] = `
isLandscape={false}
isTablet={false}
label={
<FormattedText
defaultMessage="Mattermost Dark"
id="user.settings.display.Mattermost Dark"
/>
<Text>
Mattermost Dark
</Text>
}
selected={false}
theme={
@@ -183,10 +180,9 @@ exports[`Theme should match snapshot 1`] = `
isLandscape={false}
isTablet={false}
label={
<FormattedText
defaultMessage="Windows Dark"
id="user.settings.display.Windows Dark"
/>
<Text>
Windows Dark
</Text>
}
selected={false}
theme={

View File

@@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import React from 'react';
import {View} from 'react-native';
import {Text, View} from 'react-native';
import PropTypes from 'prop-types';
import {intlShape} from 'react-intl';
@@ -80,10 +80,9 @@ export default class Theme extends React.PureComponent {
<ThemeTile
key={allowedTheme.key}
label={(
<FormattedText
id={`user.settings.display.${allowedTheme.type}`}
defaultMessage={allowedTheme.type}
/>
<Text>
{allowedTheme.type}
</Text>
)}
action={this.setTheme}
actionValue={allowedTheme.key}
@@ -103,7 +102,7 @@ export default class Theme extends React.PureComponent {
<SectionItem
label={(
<FormattedText
id={`user.settings.display.${item.type}`}
id='user.settings.display.custom_theme'
defaultMessage={'Custom Theme'}
/>
)}

View File

@@ -127,7 +127,6 @@
"mobile.account.settings.save": "Save",
"mobile.account.settings.cancel": "Cancel",
"mobile.action_menu.select": "Select an option",
"mobile.action_menu.submitted": "Submitted",
"mobile.advanced_settings.clockDisplay": "Clock display",
"mobile.advanced_settings.delete": "Delete",
"mobile.advanced_settings.delete_message": "\nThis will reset all offline data and restart the app. You will be automatically logged back in once the app restarts.\n",
@@ -273,7 +272,6 @@
"mobile.managed.secured_by": "Secured by {vendor}",
"mobile.markdown.code.copy_code": "Copy Code",
"mobile.markdown.code.plusMoreLines": "+{count, number} more {count, plural, one {line} other {lines}}",
"mobile.markdown.image.error": "Image failed to load:",
"mobile.markdown.image.too_large": "Image exceeds max dimensions of {maxWidth} by {maxHeight}:",
"mobile.markdown.link.copy_url": "Copy URL",
"mobile.mention.copy_mention": "Copy Mention",
@@ -356,7 +354,6 @@
"mobile.post.failed_title": "Unable to send your message",
"mobile.post.retry": "Refresh",
"mobile.posts_view.moreMsg": "More New Messages Above",
"mobile.reaction_list.title": "Reactions",
"mobile.recent_mentions.empty_description": "Messages containing your username and other words that trigger mentions will appear here.",
"mobile.recent_mentions.empty_title": "No Recent Mentions",
"mobile.rename_channel.display_name_maxLength": "Channel name must be less than {maxLength, number} characters",