set up translations for link labels
This commit is contained in:
parent
1ce756a849
commit
aa87340345
|
@ -685,5 +685,13 @@
|
||||||
"multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.",
|
"multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.",
|
||||||
"accessibility_hint": "Double tap to dismiss this wizard"
|
"accessibility_hint": "Double tap to dismiss this wizard"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"a11y": {
|
||||||
|
"meta_entity": {
|
||||||
|
"url": "Link: %s",
|
||||||
|
"hashtag": "Hastag %s",
|
||||||
|
"mention": "Show Profile: %s",
|
||||||
|
"email": "Email address: %s",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,12 +11,16 @@ extension Meta.Entity {
|
||||||
var accessibilityCustomActionLabel: String? {
|
var accessibilityCustomActionLabel: String? {
|
||||||
switch meta {
|
switch meta {
|
||||||
case .url(_, trimmed: _, url: let url, userInfo: _):
|
case .url(_, trimmed: _, url: let url, userInfo: _):
|
||||||
|
// TODO: i18n (a11y.meta_entity.url)
|
||||||
return "Link: \(url)"
|
return "Link: \(url)"
|
||||||
case .hashtag(_, hashtag: let hashtag, userInfo: _):
|
case .hashtag(_, hashtag: let hashtag, userInfo: _):
|
||||||
|
// TODO: i18n (a11y.meta_entity.hashtag)
|
||||||
return "Hashtag \(hashtag)"
|
return "Hashtag \(hashtag)"
|
||||||
case .mention(_, mention: let mention, userInfo: _):
|
case .mention(_, mention: let mention, userInfo: _):
|
||||||
return "Show Profile: @\(mention)"
|
// TODO: i18n (a11y.meta_entity.mention)
|
||||||
|
return "Show Profile: \("@" + mention)"
|
||||||
case .email(let email, userInfo: _):
|
case .email(let email, userInfo: _):
|
||||||
|
// TODO: i18n (a11y.meta_entity.email)
|
||||||
return "Email address: \(email)"
|
return "Email address: \(email)"
|
||||||
// emoji are not actionable
|
// emoji are not actionable
|
||||||
case .emoji:
|
case .emoji:
|
||||||
|
|
Loading…
Reference in New Issue