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
|
@ -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.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue