Skip to content

Commit

Permalink
fix: updated margin, removed unused i18n translation and improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak committed Dec 10, 2024
1 parent 76e3cd3 commit 02af0f0
Show file tree
Hide file tree
Showing 24 changed files with 11 additions and 34 deletions.
1 change: 0 additions & 1 deletion app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
"Invalid_or_expired_invite_token": "رمز الدعوة غير صالح أو منتهي الصلاحية",
"Invalid_server_version": "الخادم الذي تحاول الاتصال به يستخدم إصدارا لم يعد مدعوماً: {{currentVersion}}.\n\n النسخ المدعومة تبدأ من {{minVersion}}",
"Invalid_workspace_URL": "عنوان URL لمساحة العمل غير صالح",
"Invisible": "غير مرئي",
"Invite_Link": "رابط الدعوة",
"Invite_user_to_join_channel": "دعوة مستخدم واحد إلى الانضمام إلى هذه القناة",
"Invite_user_to_join_channel_all_from": "دعوة جميع المستخدمين من [‎#channel] إلى الانضمام إلى هذه القناة",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
"Invalid_or_expired_invite_token": "অকার্যকর বা মেয়াদ উত্তীর্ণ ইনভাইট টোকেন",
"Invalid_server_version": "আপনি যাচাই করতে চেষ্টা করছেন তার একটি সংস্করণ ব্যবহার করছেন যা এখনও অ্যাপ দ্বারা সাপোর্ট করা হয়নি: {{currentVersion}}।\n\nআমরা সংস্করণ {{minVersion}} প্রয়োজন প্রয়োজন",
"Invalid_workspace_URL": "অবৈধ ওয়ার্কস্পেস URL",
"Invisible": "অদৃশ্য",
"Invite_Link": "আমন্ত্রণ লিঙ্ক",
"Invite_users": "ব্যবহারকারীদের আমন্ত্রণ করুন",
"IP": "IP",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@
"Invalid_or_expired_invite_token": "Neplatný nebo vypršela platnost tokenu pozvánky",
"Invalid_server_version": "Pracovní prostor, který se pokoušíte připojit, používá verzi, která již není aplikací podporována: {{currentVersion}}.\n\nPožadujeme verzi {{minVersion}}",
"Invalid_workspace_URL": "Neplatná URL adresa pracovního prostoru",
"Invisible": "Neviditelný",
"Invite_Link": "Odkaz na pozvánku",
"Invite_user_to_join_channel": "Pozvat jednoho uživatele, aby se připojil k tomuto kanálu",
"Invite_user_to_join_channel_all_from": "Pozvat všechny uživatele z [#channel], aby se připojili k tomuto kanálu",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@
"Invalid_or_expired_invite_token": "Ungültiger oder abgelaufener Einladungscode",
"Invalid_server_version": "Der Server, mit dem Sie sich verbinden möchten, verwendet eine Version, die von der App nicht mehr unterstützt wird: {{currentVersion}}.\n\nWir benötigen Version {{minVersion}}.",
"Invalid_workspace_URL": "Ungültige Arbeitsbereichs-URL",
"Invisible": "Unsichtbar",
"Invite_Link": "Einladungs-Link",
"Invite_user_to_join_channel": "Benutzer in diesen Channel einladen",
"Invite_user_to_join_channel_all_from": "Alle Benutzer des Channels [#channel] einladen, diesem Channel zu folgen",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
"Invalid_or_expired_invite_token": "Invalid or expired invite token",
"Invalid_server_version": "The workspace you're trying to connect is using a version that's not supported by the app anymore: {{currentVersion}}.\n\nWe require version {{minVersion}}",
"Invalid_workspace_URL": "Invalid workspace URL",
"Invisible": "Invisible",
"Invite_Link": "Invite link",
"Invite_user_to_join_channel": "Invite one user to join this channel",
"Invite_user_to_join_channel_all_from": "Invite all users from [#channel] to join this channel",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
"In_App_and_Desktop_Alert_info": "Muestra un banner en la parte superior de la pantalla cuando la aplicación esté abierta y muestra una notificación en el escritorio",
"Invalid_server_version": "El servidor que intentas conectar está usando una versión que ya no está soportada por la aplicación : {{currentVersion}}. Se requiere una versión {{minVersion}}.",
"Invalid_workspace_URL": "URL del espacio de trabajo no válida",
"Invisible": "Invisible",
"Invite_user_to_join_channel": "Invitar a un usuario a unirse a este canal",
"Invite_user_to_join_channel_all_from": "Invitar a todos los usuarios de [#channell] a que se unan a este canal",
"Invite_user_to_join_channel_all_to": "Invitar a todos los usuarios de este canal a unirse a [#channel]",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@
"Invalid_or_expired_invite_token": "Virheellinen tai vanhentunut kutsutunnus",
"Invalid_server_version": "Palvelin, johon yrität muodostaa yhteyttä, käyttää versiota, jota sovellus ei enää tue: {{currentVersion}}.\n\nEdellytämme versiota {{minVersion}}",
"Invalid_workspace_URL": "Virheellinen työtilan URL-osoite",
"Invisible": "Näkymätön",
"Invite_Link": "Kutsulinkki",
"Invite_user_to_join_channel": "Kutsu käyttäjä liittymään tälle kanavalle",
"Invite_user_to_join_channel_all_from": "Kutsu kaikki käyttäjät kanavalta [#channel] liittymään tälle kanavalle",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@
"Invalid_or_expired_invite_token": "Jeton d'invitation non valide ou expiré",
"Invalid_server_version": "Le serveur auquel vous essayez de vous connecter utilise une version qui n'est plus prise en charge par l'application : {{currentVersion}}.\n\nNous exigeons la version {{minVersion}}",
"Invalid_workspace_URL": "URL d’espace de travail invalide",
"Invisible": "Invisible",
"Invite_Link": "Lien d'invitation",
"Invite_user_to_join_channel": "Inviter un utilisateur à rejoindre le canal",
"Invite_user_to_join_channel_all_from": "Inviter tous les utilisateurs de [#channel] à rejoindre ce canal",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/hi-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
"Invalid_or_expired_invite_token": "अमान्य या समाप्त होने वाला निमंत्रण टोकन",
"Invalid_server_version": "यह कार्यस्थान जिससे आप कनेक्ट करने का प्रयास कर रहे हैं, वह ऐप द्वारा अब समर्थित नहीं है: {{currentVersion}}।\n\nहमें {{minVersion}} संस्करण की आवश्यकता है",
"Invalid_workspace_URL": "अमान्य कार्यक्षेत्र URL",
"Invisible": "अदृश्य",
"Invite_Link": "निमंत्रण लिंक",
"Invite_users": "उपयोगकर्ताओं को निमंत्रित करें",
"IP": "आईपी",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
"Invalid_or_expired_invite_token": "Érvénytelen vagy lejárt meghívási token",
"Invalid_server_version": "A munkaterület, amelyhez csatlakozni próbál, olyan verziót használ, amelyet az alkalmazás már nem támogat: {{currentVersion}}. \n\nA {{minVersion}} verzióra van szükségünk",
"Invalid_workspace_URL": "Érvénytelen munkaterület URL",
"Invisible": "Láthatatlan",
"Invite_Link": "Meghívási hivatkozás",
"Invite_users": "Felhasználók meghívása",
"IP": "IP-cím",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@
"Invalid_or_expired_invite_token": "Token di invito non valido o scaduto",
"Invalid_server_version": "Il server a cui stai cercando di connetterti sta utilizzando una versione non più supportata dall'app: {{currentVersion}}.\n\nVersione minima richiesta: {{minVersion}}",
"Invalid_workspace_URL": "URL dello spazio di lavoro non valido",
"Invisible": "Invisibile",
"Invite_Link": "Link di invito",
"Invite_user_to_join_channel": "Invita un utente ad entrare in questo canale",
"Invite_user_to_join_channel_all_from": "Invita tutti gli utenti da [#channell] per unirsi a questo canale",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
"Invalid_or_expired_invite_token": "招待トークンが無効か、期限が切れています",
"Invalid_server_version": "接続しようとしているサーバーのバージョン({{currentVersion}})はサポートされていません。\n\nサポートする最低バージョンは {{minVersion}} です",
"Invalid_workspace_URL": "無効なワークスペースのURL",
"Invisible": "状態を隠す",
"Invite_Link": "招待リンク",
"Invite_user_to_join_channel": "1ユーザーをこのチャネルに招待",
"Invite_user_to_join_channel_all_from": "[#channel]のすべてのユーザーをこのチャネルに招待",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@
"Invalid_or_expired_invite_token": "Ongeldige of verlopen uitnodigingstoken",
"Invalid_server_version": "De server waarmee je probeert te verbinden, gebruikt een versie die niet meer door de app wordt ondersteund: {{currentVersion}}.\n\nWe hebben versie {{minVersion}} nodig",
"Invalid_workspace_URL": "Ongeldige werkruimte-URL",
"Invisible": "Onzichtbaar",
"Invite_Link": "Uitnodigingslink",
"Invite_user_to_join_channel": "Nodig een gebruiker uit om lid te worden van dit kanaal",
"Invite_user_to_join_channel_all_from": "Nodig alle gebruikers van [#kanaal] uit om lid te worden van dit kanaal",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@
"Invalid_or_expired_invite_token": "Token de convite inválido ou vencido",
"Invalid_server_version": "O servidor que você está conectando não é suportado mais por esta versão do aplicativo: {{currentVersion}}.\n\nEsta versão do aplicativo requer a versão {{minVersion}} da workspace para funcionar corretamente.",
"Invalid_workspace_URL": "URL de workspace inválida",
"Invisible": "Invisível",
"Invite_Link": "Link de convite",
"Invite_user_to_join_channel": "Convidar um usuário para ingressar neste canal",
"Invite_user_to_join_channel_all_from": "Convidar todos os usuários de [#channel] para ingressar neste canal",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
"Invalid_or_expired_invite_token": "Token de convite invalido ou expirado",
"Invalid_server_version": "O servidor ao qual esta tentando ligar-se, utiliza uma versão que não é suporta pela aplicação: {{currentVersion}}.\n\nA versão mínima requerida é {{minVersion}}",
"Invalid_workspace_URL": "URL de espaço de trabalho inválida",
"Invisible": "Invisível",
"Invite_Link": "Link de convite",
"Invite_user_to_join_channel": "Convidar um utilizador para juntar-se a este canal",
"Invite_user_to_join_channel_all_from": "Convide todos os utilizadores de [#channel] a participar deste canal",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
"Invalid_or_expired_invite_token": "Токен приглашения не действителен или с истекшим сроком действия",
"Invalid_server_version": "Сервер, к которому вы пытаетесь подключиться, использует версию, которая больше не поддерживается приложением: {{currentVersion}}.\n\nНам нужна версия {{minVersion}}",
"Invalid_workspace_URL": "Недействительный URL рабочего пространства",
"Invisible": "Невидимый",
"Invite_Link": "Ссылка Приглашения",
"Invite_user_to_join_channel": "Пригласить пользователя в канал",
"Invite_user_to_join_channel_all_from": "Пригласить всех пользователей из [#channel] присоединиться к этому каналу",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@
"Invalid_or_expired_invite_token": "Neveljaven ali iztekel žeton povabila",
"Invalid_server_version": "Strežnik, ki ga poskušate povezati, uporablja različico, ki je aplikacija ne podpira več: {{currentVersion}}.\n\nZahtevamo različico {{minVersion}}",
"Invalid_workspace_URL": "Neveljaven URL delovnega prostora",
"Invisible": "Neviden",
"Invite_Link": "Povezava povabila",
"Invite_user_to_join_channel": "Povabi uporabnika, da se pridruži kanalu",
"Invite_user_to_join_channel_all_from": "Povabi vse uporabnike iz [#channel], da se pridružijo kanalu",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@
"Invalid_or_expired_invite_token": "Ogiltig eller utgången inbjudningstoken",
"Invalid_server_version": "Den server du försöker ansluta till använder en version som appen inte har stöd för längre: {{currentVersion}}.\n\nDu måste ha version {{minVersion}}",
"Invalid_workspace_URL": "Ogiltig arbetsytas URL",
"Invisible": "Dold",
"Invite_Link": "Inbjudningslänk",
"Invite_user_to_join_channel": "Bjud in en användare till att ansluta till denna kanal.",
"Invite_user_to_join_channel_all_from": "Bjud in alla användare från [#kanalen] för att gå med i den här kanalen",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/ta-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
"Invalid_or_expired_invite_token": "தவறான அல்லது காலாவதி அழைப்பு டோக்கன்",
"Invalid_server_version": "நீங்கள் இணைக்க முயற்சிக்கின்றீர்கள் பயன்பாட்டை ஆதரிக்காத பதிப்புக்கு உள்ள வெளிப்புற படைப்புக்கு உபயோகிக்கிற பேனல்: {{currentVersion}}.\n\nஎங்களுக்கு பதிப்பு தேவைப்படுகின்றது {{minVersion}}",
"Invalid_workspace_URL": "தவறான வேலைத்தள URL",
"Invisible": "தெரியாதது",
"Invite_Link": "அழைப்பு இணைப்பு",
"Invite_users": "பயனர்களை அழை",
"IP": "IP",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/te-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
"Invalid_or_expired_invite_token": "అమాయక లేదా అవధిచుక్తాయిన అమర్పు టోకెన్",
"Invalid_server_version": "మీరు కనెక్ట్ చేయడానికి ప్రయాసిస్తున్న వర్క్‌స్పేస్ యొక్క ఒక అవసరం లేదు: {{currentVersion}}.\n\nమేము వినియోగించే అప్లికేషన్ యొక్క ఆవశ్యకానికి అయితే మేము అవసరం ఉన్న సంస్కరణం: {{minVersion}}",
"Invalid_workspace_URL": "చెల్లని వర్క్‌స్పేస్ URL",
"Invisible": "కనిపించదు",
"Invite_Link": "ఆమంత్రణ లింక్",
"Invite_users": "వాడికి ఆమంత్రణం పంపండి",
"IP": "IP",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
"Invalid_or_expired_invite_token": "Geçersiz veya süresi dolmuş davet belirteci (token)",
"Invalid_server_version": "Bağlanmaya çalıştığınız sunucu artık uygulama tarafından desteklenmeyen bir sürüm kullanıyor: {{currentVersion}}.\n\n{{minVersion}} sürümüne ihtiyacımız var",
"Invalid_workspace_URL": "Geçersiz çalışma alanı URL'si",
"Invisible": "Görünmez",
"Invite_Link": "Davet Bağlantısı",
"Invite_user_to_join_channel": "Bu kanala katılması için bir kullanıcı davet",
"Invite_user_to_join_channel_all_from": "[#kanal] 'daki tüm kullanıcıları bu kanala katılmaya davet et",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@
"Invalid_or_expired_invite_token": "无效或到期的邀请 token",
"Invalid_server_version": "此 App 版本已不支援您正在连线之服务器版本。当前版本: {{currentVersion}}.\\n\\n最低版本要求: {{minVersion}}",
"Invalid_workspace_URL": "无效的工作区 URL",
"Invisible": "隐身",
"Invite_Link": "邀请链接",
"Invite_users": "邀请用戶",
"IP": "IP",
Expand Down
1 change: 0 additions & 1 deletion app/i18n/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
"Invalid_or_expired_invite_token": "無效或到期的邀請 token",
"Invalid_server_version": "此 App 版本已不支援您正在連線之伺服器版本。當前版本: {{currentVersion}}.\\n\\n最低版本要求: {{minVersion}}",
"Invalid_workspace_URL": "無效的工作區 URL",
"Invisible": "隱身",
"Invite_Link": "邀請連結",
"Invite_user_to_join_channel": "邀請使用者加入此頻道",
"Invite_user_to_join_channel_all_from": "邀請[#channel]中的所有使用者加入此頻道",
Expand Down
22 changes: 11 additions & 11 deletions app/views/StatusView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const STATUS: IStatus[] = [

const styles = StyleSheet.create({
inputContainer: {
paddingHorizontal: 12,
paddingHorizontal: 16,
marginTop: 24,
marginBottom: 12
},
Expand All @@ -58,7 +58,7 @@ const styles = StyleSheet.create({
},
footerComponent: {
marginTop: 36,
paddingHorizontal: 12
paddingHorizontal: 16
}
});

Expand All @@ -75,7 +75,7 @@ const Status = ({
return (
<>
<List.Item
additionalAcessibilityLabel={` - ${status === id ? I18n.t('Current_Status') : ''}`}
additionalAcessibilityLabel={`${status === id ? I18n.t('Current_Status') : ''}`}
title={name}
onPress={() => {
const key = `STATUS_${statusType.id.toUpperCase()}` as keyof typeof events;
Expand Down Expand Up @@ -146,16 +146,16 @@ const StatusView = (): React.ReactElement => {

const statusType = Accounts_AllowInvisibleStatusOption ? STATUS : STATUS.filter(s => s.id !== 'offline');

const isStatusMatching = () => {
const isStatusEqual = status === user.status;
const isStatusTextEqual = (!!user.statusText && user.statusText === statusText) || (!user.statusText && !statusText);

return isStatusEqual && isStatusTextEqual;
};

const FooterComponent = () => (
<View style={styles.footerComponent}>
<Button
testID='status-view-submit'
disabled={
status === user.status && ((!!user.statusText && user.statusText === statusText) || (!user.statusText && !statusText))
}
onPress={submit}
title={I18n.t('Save')}
/>
<Button testID='status-view-submit' disabled={isStatusMatching()} onPress={submit} title={I18n.t('Save')} />
</View>
);

Expand Down

0 comments on commit 02af0f0

Please sign in to comment.