mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Use strings from Localazy (#718)
* Adopt strings from Localazy. * Remove all old Android strings. * Disable german snapshot tests for now. * Rebase and add latest strings.
This commit is contained in:
@@ -34,7 +34,7 @@ struct MessageComposer: View {
|
||||
VStack(alignment: .leading, spacing: -6) {
|
||||
header
|
||||
HStack(alignment: .bottom) {
|
||||
MessageComposerTextField(placeholder: ElementL10n.roomMessagePlaceholder,
|
||||
MessageComposerTextField(placeholder: L10n.richTextEditorComposerPlaceholder,
|
||||
text: $text,
|
||||
focused: $focused,
|
||||
isMultiline: $isMultiline,
|
||||
@@ -94,14 +94,14 @@ struct MessageComposer: View {
|
||||
Image(systemName: "checkmark")
|
||||
.opacity(type.isEdit ? 1 : 0)
|
||||
.fontWeight(.medium)
|
||||
.accessibilityLabel(ElementL10n.actionConfirm)
|
||||
.accessibilityLabel(L10n.actionConfirm)
|
||||
.accessibilityHidden(!type.isEdit)
|
||||
Image(asset: Asset.Images.timelineComposerSendMessage)
|
||||
.resizable()
|
||||
.frame(width: sendButtonIconSize, height: sendButtonIconSize)
|
||||
.padding(EdgeInsets(top: 7, leading: 8, bottom: 7, trailing: 6))
|
||||
.opacity(type.isEdit ? 0 : 1)
|
||||
.accessibilityLabel(ElementL10n.actionSend)
|
||||
.accessibilityLabel(L10n.actionSend)
|
||||
.accessibilityHidden(type.isEdit)
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ private struct MessageComposerReplyHeader: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
Label(ElementL10n.roomTimelineReplyingTo(displayName), systemImage: "arrowshape.turn.up.left")
|
||||
Label(L10n.commonReplyingTo(displayName), systemImage: "arrowshape.turn.up.left")
|
||||
.labelStyle(MessageComposerHeaderLabelStyle())
|
||||
Spacer()
|
||||
Button(action: action) {
|
||||
@@ -140,7 +140,7 @@ private struct MessageComposerEditHeader: View {
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .center) {
|
||||
Label(ElementL10n.roomTimelineEditing, systemImage: "pencil.line")
|
||||
Label(L10n.commonEditing, systemImage: "pencil.line")
|
||||
.labelStyle(MessageComposerHeaderLabelStyle())
|
||||
Spacer()
|
||||
Button(action: action) {
|
||||
|
||||
@@ -111,7 +111,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
content()
|
||||
|
||||
if timelineItem.properties.isEdited {
|
||||
Text(ElementL10n.editedSuffix)
|
||||
Text(L10n.commonEditedSuffix)
|
||||
.font(.element.caption2)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ struct TimelineItemPlainStylerView<Content: View>: View {
|
||||
private var supplementaryViews: some View {
|
||||
VStack {
|
||||
if timelineItem.properties.isEdited {
|
||||
Text(ElementL10n.editedSuffix)
|
||||
Text(L10n.commonEditedSuffix)
|
||||
.font(.element.footnote)
|
||||
.foregroundColor(.element.tertiaryContent)
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ struct CollapsibleRoomTimelineView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
DisclosureGroup(ElementL10n.roomTimelineStateChanges(timelineItem.items.count),
|
||||
isExpanded: $isExpanded) {
|
||||
DisclosureGroup(L10n.roomTimelineStateChanges(timelineItem.items.count), isExpanded: $isExpanded) {
|
||||
Group {
|
||||
ForEach(timelineViews) { timelineView in
|
||||
timelineView.body
|
||||
|
||||
@@ -41,7 +41,7 @@ struct ImageRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ struct ImageRoomTimelineView: View {
|
||||
@ViewBuilder
|
||||
var overlay: some View {
|
||||
if timelineItem.contentType == .gif {
|
||||
Text(ElementL10n.roomTimelineImageGif)
|
||||
Text(L10n.commonGif)
|
||||
.font(.element.bodyBold)
|
||||
.foregroundStyle(.primary)
|
||||
.padding(.horizontal, 10)
|
||||
|
||||
@@ -22,7 +22,7 @@ struct ReadMarkerRoomTimelineView: View {
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .trailing, spacing: 2) {
|
||||
Text(ElementL10n.roomTimelineReadMarkerTitle)
|
||||
Text(L10n.roomTimelineReadMarkerTitle)
|
||||
.textCase(.uppercase)
|
||||
.font(.element.caption2Bold)
|
||||
.foregroundColor(.element.quaternaryContent)
|
||||
|
||||
@@ -34,7 +34,7 @@ struct RedactedRoomTimelineView_Previews: PreviewProvider {
|
||||
|
||||
static var previews: some View {
|
||||
VStack(alignment: .leading, spacing: 20.0) {
|
||||
RedactedRoomTimelineView(timelineItem: itemWith(text: ElementL10n.eventRedacted,
|
||||
RedactedRoomTimelineView(timelineItem: itemWith(text: L10n.commonMessageRemoved,
|
||||
timestamp: "Later",
|
||||
senderId: "Anne"))
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ struct StickerRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ struct TimelineStartRoomTimelineView: View {
|
||||
}
|
||||
|
||||
var title: String {
|
||||
var text = ElementL10n.thisIsTheBeginningOfRoomNoName
|
||||
var text = L10n.roomTimelineBeginningOfRoomNoName
|
||||
if let name = timelineItem.name {
|
||||
text = ElementL10n.thisIsTheBeginningOfRoom(name)
|
||||
text = L10n.roomTimelineBeginningOfRoom(name)
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ struct VideoRoomTimelineView: View {
|
||||
.foregroundColor(.element.systemGray6)
|
||||
.opacity(0.3)
|
||||
|
||||
ProgressView(ElementL10n.loading)
|
||||
ProgressView(L10n.commonLoading)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,43 +74,43 @@ public struct TimelineItemContextMenu: View {
|
||||
switch action {
|
||||
case .react:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.reactions, systemImage: "face.smiling")
|
||||
Label(L10n.commonReactions, systemImage: "face.smiling")
|
||||
}
|
||||
case .copy:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.actionCopy, systemImage: "doc.on.doc")
|
||||
Label(L10n.actionCopy, systemImage: "doc.on.doc")
|
||||
}
|
||||
case .edit:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.edit, systemImage: "pencil.line")
|
||||
Label(L10n.actionEdit, systemImage: "pencil.line")
|
||||
}
|
||||
case .quote:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.actionQuote, systemImage: "quote.bubble")
|
||||
Label(L10n.actionQuote, systemImage: "quote.bubble")
|
||||
}
|
||||
case .copyPermalink:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.permalink, systemImage: "link")
|
||||
Label(L10n.commonPermalink, systemImage: "link")
|
||||
}
|
||||
case .reply:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.reply, systemImage: "arrowshape.turn.up.left")
|
||||
Label(L10n.actionReply, systemImage: "arrowshape.turn.up.left")
|
||||
}
|
||||
case .redact:
|
||||
Button(role: .destructive) { send(action) } label: {
|
||||
Label(ElementL10n.actionRemove, systemImage: "trash")
|
||||
Label(L10n.actionRemove, systemImage: "trash")
|
||||
}
|
||||
case .viewSource:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.viewSource, systemImage: "doc.text.below.ecg")
|
||||
Label(L10n.actionViewSource, systemImage: "doc.text.below.ecg")
|
||||
}
|
||||
case .retryDecryption:
|
||||
Button { send(action) } label: {
|
||||
Label(ElementL10n.roomTimelineContextMenuRetryDecryption, systemImage: "arrow.down.message")
|
||||
Label(L10n.actionRetryDecryption, systemImage: "arrow.down.message")
|
||||
}
|
||||
case .report:
|
||||
Button(role: .destructive) { send(action) } label: {
|
||||
Label(ElementL10n.reportContent, systemImage: "exclamationmark.bubble")
|
||||
Label(L10n.actionReportContent, systemImage: "exclamationmark.bubble")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,12 +40,12 @@ struct TimelineItemDebugView: View {
|
||||
.navigationTitle(info.title)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button(ElementL10n.actionCancel) {
|
||||
Button(L10n.actionCancel) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
ToolbarItem(placement: .secondaryAction) {
|
||||
Button(ElementL10n.actionCopy) {
|
||||
Button(L10n.actionCopy) {
|
||||
UIPasteboard.general.string = info.content
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user