diff --git a/app/mobile/src/constants/Strings.js b/app/mobile/src/constants/Strings.js index a65fc40f..8047db29 100644 --- a/app/mobile/src/constants/Strings.js +++ b/app/mobile/src/constants/Strings.js @@ -185,6 +185,8 @@ const Strings = [ policy: 'Terms of Use and User Policy', editMessage: 'Edit Message Text', + emptyTopic: 'Empty Topic', + notes: 'Notes', }, { languageCode: 'fr', @@ -366,6 +368,8 @@ const Strings = [ policy: 'Conditions d\'Utilisation et Politique d\'Utilisation', editMessage: 'Modifier le Texte du Message', + emptyTopic: 'Pas de Messages', + notes: 'Notes', }, { languageCode: 'es', @@ -547,6 +551,8 @@ const Strings = [ policy: 'Términos de Uso y Política de Usuario', editMessage: 'Editar Texto del Mensaje', + emptyTopic: 'Ningún Mensaje', + notes: 'Notas', }, { languageCode: 'de', @@ -728,6 +734,8 @@ const Strings = [ policy: 'Nutzungsbedingungen und Benutzerrichtlinien', editMessage: 'Nachrichtentext Bearbeiten', + emptyTopic: 'Keine Nachrichten', + notes: 'Anmerkungen', }, { languageCode: 'pt', @@ -894,6 +902,8 @@ const Strings = [ terms: 'Ver Termos de Serviço', policy: 'Termos de Uso e Política do Usuário', editMessage: 'Editar Texto da Mensagem', + emptyTopic: 'Sem Mensagens', + notes: 'Notas', }, ]; diff --git a/app/mobile/src/context/channelUtil.js b/app/mobile/src/context/channelUtil.js index b6975db7..ce2ebe4c 100644 --- a/app/mobile/src/context/channelUtil.js +++ b/app/mobile/src/context/channelUtil.js @@ -1,6 +1,6 @@ import { getCardByGuid } from 'context/cardUtil'; -export function getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl) { +export function getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl, strings) { let subject; try { @@ -31,7 +31,7 @@ export function getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardI if (!subject) { if (contacts.length === 0) { - subject = 'Notes'; + subject = strings?.notes; } else { const names = []; diff --git a/app/mobile/src/session/channels/useChannels.hook.js b/app/mobile/src/session/channels/useChannels.hook.js index 3e0b5566..2a30e36e 100644 --- a/app/mobile/src/session/channels/useChannels.hook.js +++ b/app/mobile/src/session/channels/useChannels.hook.js @@ -109,7 +109,7 @@ export function useChannels() { } const profileGuid = profile.state?.identity?.guid; - const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, item, card.state.cards, card.actions.getCardImageUrl); + const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, item, card.state.cards, card.actions.getCardImageUrl, state.strings); const updated = (loginTimestamp < timestamp) && (readRevision < topicRevision); diff --git a/app/mobile/src/session/conversation/useConversation.hook.js b/app/mobile/src/session/conversation/useConversation.hook.js index 07f0eb54..42e4816a 100644 --- a/app/mobile/src/session/conversation/useConversation.hook.js +++ b/app/mobile/src/session/conversation/useConversation.hook.js @@ -79,7 +79,7 @@ export function useConversation() { const hosted = conversation.state.card == null; const cards = card.state.cards; cardImageUrl = card.actions.getCardImageUrl; - const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl); + const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl, state.strings); if (channel?.topicRevision && channel.readRevision !== channel.topicRevision) { conversation.actions.setChannelReadRevision(channel.topicRevision); diff --git a/app/mobile/src/session/details/useDetails.hook.js b/app/mobile/src/session/details/useDetails.hook.js index b9619727..b46e80e9 100644 --- a/app/mobile/src/session/details/useDetails.hook.js +++ b/app/mobile/src/session/details/useDetails.hook.js @@ -124,7 +124,7 @@ export function useDetails(clear) { const channel = conversation.state.channel; const cards = card.state.cards; const cardImageUrl = card.actions.getCardImageUrl; - const { logo, subject } = getChannelSubjectLogo(hostId, profileGuid, channel, cards, cardImageUrl); + const { logo, subject } = getChannelSubjectLogo(hostId, profileGuid, channel, cards, cardImageUrl, state.strings); let timestamp; const { timeFull, monthLast } = profile.state || {}; diff --git a/app/mobile/src/session/sharing/useSharing.hook.js b/app/mobile/src/session/sharing/useSharing.hook.js index 14f19127..b6d80417 100644 --- a/app/mobile/src/session/sharing/useSharing.hook.js +++ b/app/mobile/src/session/sharing/useSharing.hook.js @@ -6,9 +6,11 @@ import { ProfileContext } from 'context/ProfileContext'; import { getChannelSeals, isUnsealed, getContentKey, encryptChannelSubject, decryptChannelSubject, decryptTopicSubject } from 'context/sealUtil'; import { getCardByGuid } from 'context/cardUtil'; import { getChannelSubjectLogo } from 'context/channelUtil'; +import { getLanguageStrings } from 'constants/Strings'; export function useSharing() { const [state, setState] = useState({ + strings: getLanguageStrings(), channels: [], }); @@ -59,7 +61,7 @@ export function useSharing() { } const profileGuid = profile.state?.identity?.guid; - const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, item, card.state.cards, card.actions.getCardImageUrl); + const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, item, card.state.cards, card.actions.getCardImageUrl, state.strings); return { cardId, channelId, subject, message, logo, timestamp, locked, unlocked }; }