Replace "Element" with a brand const (#8074)
This commit is contained in:
parent
d922ee2cb9
commit
9961b003bb
5 changed files with 17 additions and 12 deletions
|
@ -73,9 +73,9 @@ const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
|
||||||
<div className="mx_Dialog_content">
|
<div className="mx_Dialog_content">
|
||||||
<div className="mx_AnalyticsLearnMore_image_holder" />
|
<div className="mx_AnalyticsLearnMore_image_holder" />
|
||||||
<div className="mx_AnalyticsLearnMore_copy">
|
<div className="mx_AnalyticsLearnMore_copy">
|
||||||
{ _t("Help us identify issues and improve Element by sharing anonymous usage data. " +
|
{ _t("Help us identify issues and improve %(analyticsOwner)s by sharing anonymous usage data. " +
|
||||||
"To understand how people use multiple devices, we'll generate a random identifier, " +
|
"To understand how people use multiple devices, we'll generate a random identifier, " +
|
||||||
"shared by your devices.",
|
"shared by your devices.", { analyticsOwner },
|
||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
<ul className="mx_AnalyticsLearnMore_bullets">
|
<ul className="mx_AnalyticsLearnMore_bullets">
|
||||||
|
|
|
@ -41,11 +41,12 @@ const showPickerDialog = (
|
||||||
};
|
};
|
||||||
|
|
||||||
const onHelpClick = () => {
|
const onHelpClick = () => {
|
||||||
|
const brand = SdkConfig.get().brand;
|
||||||
Modal.createTrackedDialog('Custom Server Dialog', '', InfoDialog, {
|
Modal.createTrackedDialog('Custom Server Dialog', '', InfoDialog, {
|
||||||
title: _t("Server Options"),
|
title: _t("Server Options"),
|
||||||
description: _t("You can use the custom server options to sign into other Matrix servers by specifying " +
|
description: _t("You can use the custom server options to sign into other Matrix servers by specifying " +
|
||||||
"a different homeserver URL. This allows you to use Element with an existing Matrix account on " +
|
"a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on " +
|
||||||
"a different homeserver."),
|
"a different homeserver.", { brand }),
|
||||||
button: _t("Dismiss"),
|
button: _t("Dismiss"),
|
||||||
hasCloseButton: false,
|
hasCloseButton: false,
|
||||||
fixedWidth: false,
|
fixedWidth: false,
|
||||||
|
|
|
@ -36,6 +36,7 @@ import AccessibleButton from '../elements/AccessibleButton';
|
||||||
import { MapError } from './MapError';
|
import { MapError } from './MapError';
|
||||||
import { getUserNameColorClass } from '../../../utils/FormattingUtils';
|
import { getUserNameColorClass } from '../../../utils/FormattingUtils';
|
||||||
import LiveDurationDropdown, { DEFAULT_DURATION_MS } from './LiveDurationDropdown';
|
import LiveDurationDropdown, { DEFAULT_DURATION_MS } from './LiveDurationDropdown';
|
||||||
|
import SdkConfig from '../../../SdkConfig';
|
||||||
export interface ILocationPickerProps {
|
export interface ILocationPickerProps {
|
||||||
sender: RoomMember;
|
sender: RoomMember;
|
||||||
shareType: LocationShareType;
|
shareType: LocationShareType;
|
||||||
|
@ -329,10 +330,11 @@ export function getGeoUri(position: IPosition): string {
|
||||||
export default LocationPicker;
|
export default LocationPicker;
|
||||||
|
|
||||||
function positionFailureMessage(code: number): string {
|
function positionFailureMessage(code: number): string {
|
||||||
|
const brand = SdkConfig.get().brand;
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 1: return _t(
|
case 1: return _t(
|
||||||
"Element was denied permission to fetch your location. " +
|
"%(brand)s was denied permission to fetch your location. " +
|
||||||
"Please allow location access in your browser settings.",
|
"Please allow location access in your browser settings.", { brand },
|
||||||
);
|
);
|
||||||
case 2: return _t(
|
case 2: return _t(
|
||||||
"Failed to fetch your location. Please try again later.",
|
"Failed to fetch your location. Please try again later.",
|
||||||
|
|
|
@ -789,7 +789,7 @@
|
||||||
"Sound on": "Sound on",
|
"Sound on": "Sound on",
|
||||||
"Silence call": "Silence call",
|
"Silence call": "Silence call",
|
||||||
"Use app for a better experience": "Use app for a better experience",
|
"Use app for a better experience": "Use app for a better experience",
|
||||||
"Element Web is experimental on mobile. For a better experience and the latest features, use our free native app.": "Element Web is experimental on mobile. For a better experience and the latest features, use our free native app.",
|
"%(brand)s is experimental on a mobile web browser. For a better experience and the latest features, use our free native app.": "%(brand)s is experimental on a mobile web browser. For a better experience and the latest features, use our free native app.",
|
||||||
"Use app": "Use app",
|
"Use app": "Use app",
|
||||||
"Your homeserver has exceeded its user limit.": "Your homeserver has exceeded its user limit.",
|
"Your homeserver has exceeded its user limit.": "Your homeserver has exceeded its user limit.",
|
||||||
"This homeserver has been blocked by it's administrator.": "This homeserver has been blocked by it's administrator.",
|
"This homeserver has been blocked by it's administrator.": "This homeserver has been blocked by it's administrator.",
|
||||||
|
@ -2142,7 +2142,7 @@
|
||||||
"Click to move the pin": "Click to move the pin",
|
"Click to move the pin": "Click to move the pin",
|
||||||
"Click to drop a pin": "Click to drop a pin",
|
"Click to drop a pin": "Click to drop a pin",
|
||||||
"Share location": "Share location",
|
"Share location": "Share location",
|
||||||
"Element was denied permission to fetch your location. Please allow location access in your browser settings.": "Element was denied permission to fetch your location. Please allow location access in your browser settings.",
|
"%(brand)s was denied permission to fetch your location. Please allow location access in your browser settings.": "%(brand)s was denied permission to fetch your location. Please allow location access in your browser settings.",
|
||||||
"Failed to fetch your location. Please try again later.": "Failed to fetch your location. Please try again later.",
|
"Failed to fetch your location. Please try again later.": "Failed to fetch your location. Please try again later.",
|
||||||
"Timed out trying to fetch your location. Please try again later.": "Timed out trying to fetch your location. Please try again later.",
|
"Timed out trying to fetch your location. Please try again later.": "Timed out trying to fetch your location. Please try again later.",
|
||||||
"Unknown error fetching location. Please try again later.": "Unknown error fetching location. Please try again later.",
|
"Unknown error fetching location. Please try again later.": "Unknown error fetching location. Please try again later.",
|
||||||
|
@ -2318,7 +2318,7 @@
|
||||||
"This address is already in use": "This address is already in use",
|
"This address is already in use": "This address is already in use",
|
||||||
"This address had invalid server or is already in use": "This address had invalid server or is already in use",
|
"This address had invalid server or is already in use": "This address had invalid server or is already in use",
|
||||||
"Server Options": "Server Options",
|
"Server Options": "Server Options",
|
||||||
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use Element with an existing Matrix account on a different homeserver.",
|
"You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.": "You can use the custom server options to sign into other Matrix servers by specifying a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on a different homeserver.",
|
||||||
"Join millions for free on the largest public server": "Join millions for free on the largest public server",
|
"Join millions for free on the largest public server": "Join millions for free on the largest public server",
|
||||||
"Homeserver": "Homeserver",
|
"Homeserver": "Homeserver",
|
||||||
"Continue with %(provider)s": "Continue with %(provider)s",
|
"Continue with %(provider)s": "Continue with %(provider)s",
|
||||||
|
@ -2352,7 +2352,7 @@
|
||||||
"Search for rooms": "Search for rooms",
|
"Search for rooms": "Search for rooms",
|
||||||
"Adding spaces has moved.": "Adding spaces has moved.",
|
"Adding spaces has moved.": "Adding spaces has moved.",
|
||||||
"You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>": "You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>",
|
"You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>": "You can read all our terms <PrivacyPolicyUrl>here</PrivacyPolicyUrl>",
|
||||||
"Help us identify issues and improve Element by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.": "Help us identify issues and improve Element by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.",
|
"Help us identify issues and improve %(analyticsOwner)s by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.": "Help us identify issues and improve %(analyticsOwner)s by sharing anonymous usage data. To understand how people use multiple devices, we'll generate a random identifier, shared by your devices.",
|
||||||
"We <Bold>don't</Bold> record or profile any account data": "We <Bold>don't</Bold> record or profile any account data",
|
"We <Bold>don't</Bold> record or profile any account data": "We <Bold>don't</Bold> record or profile any account data",
|
||||||
"We <Bold>don't</Bold> share information with third parties": "We <Bold>don't</Bold> share information with third parties",
|
"We <Bold>don't</Bold> share information with third parties": "We <Bold>don't</Bold> share information with third parties",
|
||||||
"You can turn this off anytime in settings": "You can turn this off anytime in settings",
|
"You can turn this off anytime in settings": "You can turn this off anytime in settings",
|
||||||
|
|
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import { _t } from "../languageHandler";
|
import { _t } from "../languageHandler";
|
||||||
import GenericToast from "../components/views/toasts/GenericToast";
|
import GenericToast from "../components/views/toasts/GenericToast";
|
||||||
import ToastStore from "../stores/ToastStore";
|
import ToastStore from "../stores/ToastStore";
|
||||||
|
import SdkConfig from "../SdkConfig";
|
||||||
|
|
||||||
const onAccept = () => {
|
const onAccept = () => {
|
||||||
window.location.href = "mobile_guide/";
|
window.location.href = "mobile_guide/";
|
||||||
|
@ -32,6 +33,7 @@ const TOAST_KEY = "mobileguide";
|
||||||
export const showToast = () => {
|
export const showToast = () => {
|
||||||
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||||
const isAndroid = /Android/.test(navigator.userAgent);
|
const isAndroid = /Android/.test(navigator.userAgent);
|
||||||
|
const brand = SdkConfig.get().brand;
|
||||||
if (!isIos && !isAndroid) {
|
if (!isIos && !isAndroid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -43,8 +45,8 @@ export const showToast = () => {
|
||||||
title: _t("Use app for a better experience"),
|
title: _t("Use app for a better experience"),
|
||||||
props: {
|
props: {
|
||||||
description: _t(
|
description: _t(
|
||||||
"Element Web is experimental on mobile. " +
|
"%(brand)s is experimental on a mobile web browser. " +
|
||||||
"For a better experience and the latest features, use our free native app.",
|
"For a better experience and the latest features, use our free native app.", { brand },
|
||||||
),
|
),
|
||||||
acceptLabel: _t("Use app"),
|
acceptLabel: _t("Use app"),
|
||||||
onAccept,
|
onAccept,
|
||||||
|
|
Loading…
Reference in a new issue