Replace "Element" with a brand const (#8074)

This commit is contained in:
Suguru Hirahara
2022-03-23 16:31:25 +00:00
committed by GitHub
parent d922ee2cb9
commit 9961b003bb
5 changed files with 17 additions and 12 deletions

View File

@@ -73,9 +73,9 @@ const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
<div className="mx_Dialog_content">
<div className="mx_AnalyticsLearnMore_image_holder" />
<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, " +
"shared by your devices.",
"shared by your devices.", { analyticsOwner },
) }
</div>
<ul className="mx_AnalyticsLearnMore_bullets">

View File

@@ -41,11 +41,12 @@ const showPickerDialog = (
};
const onHelpClick = () => {
const brand = SdkConfig.get().brand;
Modal.createTrackedDialog('Custom Server Dialog', '', InfoDialog, {
title: _t("Server Options"),
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."),
"a different homeserver URL. This allows you to use %(brand)s with an existing Matrix account on " +
"a different homeserver.", { brand }),
button: _t("Dismiss"),
hasCloseButton: false,
fixedWidth: false,

View File

@@ -36,6 +36,7 @@ import AccessibleButton from '../elements/AccessibleButton';
import { MapError } from './MapError';
import { getUserNameColorClass } from '../../../utils/FormattingUtils';
import LiveDurationDropdown, { DEFAULT_DURATION_MS } from './LiveDurationDropdown';
import SdkConfig from '../../../SdkConfig';
export interface ILocationPickerProps {
sender: RoomMember;
shareType: LocationShareType;
@@ -329,10 +330,11 @@ export function getGeoUri(position: IPosition): string {
export default LocationPicker;
function positionFailureMessage(code: number): string {
const brand = SdkConfig.get().brand;
switch (code) {
case 1: return _t(
"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 },
);
case 2: return _t(
"Failed to fetch your location. Please try again later.",