Skip to content

Commit cd6f88e

Browse files
committed
rename night mode to dark theme
1 parent 082b202 commit cd6f88e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+81
-61
lines changed

Diff for: src/reduxTypes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export type ThemeName = 'light' | 'dark';
372372
* To determine the actual theme to show the user, use a ThemeName;
373373
* see there for details.
374374
*/
375-
export type ThemeSetting = 'default' | 'night';
375+
export type ThemeSetting = 'default' | 'dark';
376376

377377
/** What browser the user has set to use for opening links in messages.
378378
*

Diff for: src/settings/SettingsScreen.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ export default function SettingsScreen(props: Props): Node {
3535
const { navigation } = props;
3636

3737
const handleThemeChange = useCallback(() => {
38-
dispatch(setGlobalSettings({ theme: theme === 'default' ? 'night' : 'default' }));
38+
dispatch(setGlobalSettings({ theme: theme === 'default' ? 'dark' : 'default' }));
3939
}, [theme, dispatch]);
4040

4141
return (
4242
<Screen title="Settings">
43-
<SwitchRow label="Dark theme" value={theme === 'night'} onValueChange={handleThemeChange} />
43+
<SwitchRow label="Dark theme" value={theme === 'dark'} onValueChange={handleThemeChange} />
4444
<SwitchRow
4545
label="Open links with in-app browser"
4646
value={shouldUseInAppBrowser(browser)}

Diff for: src/settings/__tests__/settingsReducer-test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ describe('settingsReducer', () => {
7979
test('changes value of a key', () => {
8080
const action = deepFreeze({
8181
type: SET_GLOBAL_SETTINGS,
82-
update: { theme: 'night' },
82+
update: { theme: 'dark' },
8383
});
8484

8585
const expectedState = {
8686
...baseState,
87-
theme: 'night',
87+
theme: 'dark',
8888
};
8989

9090
const actualState = settingsReducer(baseState, action);

Diff for: src/storage/__tests__/migrations-test.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe('migrations', () => {
104104
// What `base` becomes after all migrations.
105105
const endBase = {
106106
...base52,
107-
migrations: { version: 56 },
107+
migrations: { version: 57 },
108108
};
109109

110110
for (const [desc, before, after] of [
@@ -278,6 +278,20 @@ describe('migrations', () => {
278278
},
279279
{ ...endBase, settings: { ...endBase.settings, markMessagesReadOnScroll: 'never' } },
280280
],
281+
[
282+
"check 57 with 'night'",
283+
{ ...base52, migrations: { version: 56 }, settings: { ...base52.settings, theme: 'night' } },
284+
{ ...endBase, settings: { ...endBase.settings, theme: 'dark' } },
285+
],
286+
[
287+
"check 57 with 'default'",
288+
{
289+
...base52,
290+
migrations: { version: 56 },
291+
settings: { ...base52.settings, theme: 'default' },
292+
},
293+
{ ...endBase, settings: { ...endBase.settings, theme: 'default' } },
294+
],
281295
]) {
282296
/* eslint-disable no-loop-func */
283297
test(desc, async () => {

Diff for: src/storage/migrations.js

+6
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,12 @@ const migrationsInner: {| [string]: (LessPartialState) => LessPartialState |} =
472472
// Add presenceEnabled to state.realm.
473473
'56': dropCache,
474474

475+
// Rename 'night' to 'dark' in state.settings.theme
476+
'57': state => ({
477+
...state,
478+
settings: { ...state.settings, theme: state.settings.theme === 'night' ? 'dark' : 'default' },
479+
}),
480+
475481
// TIP: When adding a migration, consider just using `dropCache`.
476482
// (See its jsdoc for guidance on when that's the right answer.)
477483
};

Diff for: static/translations/messages_ar.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "تعرف على المزيد",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "الوضع الليلي",
160+
"Night mode": "الوضع الليلي",
161161
"Open links with in-app browser": "افتح الروابط باستخدام متصفح داخل التطبيق",
162162
"Language": "لغة",
163163
"Arabic": "عربي",

Diff for: static/translations/messages_bg.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Настройки",
160-
"Dark theme": "Нощен режим",
160+
"Night mode": "Нощен режим",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Език",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_bn.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "সেটিংস",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_ca.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Més informació",
158158
"Full profile": "Full profile",
159159
"Settings": "Configuració",
160-
"Dark theme": "Mode nocturn",
160+
"Night mode": "Mode nocturn",
161161
"Open links with in-app browser": "Obre els enllaços en el navegador intern",
162162
"Language": "Llengua",
163163
"Arabic": "Àrab",

Diff for: static/translations/messages_cs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Dozvědět se více",
158158
"Full profile": "Celý profil",
159159
"Settings": "Nastavení",
160-
"Dark theme": "Noční režim",
160+
"Night mode": "Noční režim",
161161
"Open links with in-app browser": "Otevírat odkazy v zabudovaném prohlížeči",
162162
"Language": "Jazyk",
163163
"Arabic": "Arabština",

Diff for: static/translations/messages_cy.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Dysgu mwy",
158158
"Full profile": "Full profile",
159159
"Settings": "Gosodiadau",
160-
"Dark theme": "Modd nos",
160+
"Night mode": "Modd nos",
161161
"Open links with in-app browser": "Agor dolenni gyda porwr mewn-app",
162162
"Language": "Iaith",
163163
"Arabic": "Arabeg",

Diff for: static/translations/messages_da.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Sprog",
163163
"Arabic": "Arabisk",

Diff for: static/translations/messages_de.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Mehr erfahren",
158158
"Full profile": "Vollständiges Profil",
159159
"Settings": "Einstellungen",
160-
"Dark theme": "Nachtmodus",
160+
"Night mode": "Nachtmodus",
161161
"Open links with in-app browser": "Links mit in-app Browser öffnen",
162162
"Language": "Sprache",
163163
"Arabic": "Arabisch",

Diff for: static/translations/messages_el.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_el_GR.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_en_GB.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_en_NG.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"Learn more": "Learn more",
143143
"Full profile": "Full profile",
144144
"Settings": "Settings",
145-
"Dark theme": "Dark theme",
145+
"Night mode": "Night mode",
146146
"Open links with in-app browser": "Open links with in-app browser",
147147
"Language": "Language",
148148
"Arabic": "Arabic",

Diff for: static/translations/messages_eo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_es.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Aprender más",
158158
"Full profile": "Full profile",
159159
"Settings": "Ajustes",
160-
"Dark theme": "Modo noche",
160+
"Night mode": "Modo noche",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Idioma",
163163
"Arabic": "Árabe",

Diff for: static/translations/messages_fa.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "تنظیمات",
160-
"Dark theme": "حالت شبانه",
160+
"Night mode": "حالت شبانه",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "زبان",
163163
"Arabic": "عربی",

Diff for: static/translations/messages_fi.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Lisätietoja",
158158
"Full profile": "Täysi profiili",
159159
"Settings": "Asetukset",
160-
"Dark theme": "Yötila",
160+
"Night mode": "Yötila",
161161
"Open links with in-app browser": "Avaa linkit sovelluksen sisäisellä selaimella",
162162
"Language": "Kieli",
163163
"Arabic": "Arabia",

Diff for: static/translations/messages_fr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "En apprendre plus",
158158
"Full profile": "Profil complet",
159159
"Settings": "Paramètres",
160-
"Dark theme": "Mode nuit",
160+
"Night mode": "Mode nuit",
161161
"Open links with in-app browser": "Ouvrir les liens avec le navigateur intégré",
162162
"Language": "Langue",
163163
"Arabic": "Arabe",

Diff for: static/translations/messages_gl.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Configuración",
160-
"Dark theme": "Modo nocturno",
160+
"Night mode": "Modo nocturno",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Lingua",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_gu.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_hi.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "सेटिंग्स",
160-
"Dark theme": "रात्री स्वरुप",
160+
"Night mode": "रात्री स्वरुप",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "भाषा",
163163
"Arabic": "अरबी",

Diff for: static/translations/messages_hr.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_hu.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Tudj meg többet",
158158
"Full profile": "Teljes profil",
159159
"Settings": "Beállítások",
160-
"Dark theme": "Éjszakai mód",
160+
"Night mode": "Éjszakai mód",
161161
"Open links with in-app browser": "A linkek appon belüli böngészővel nyíljanak meg",
162162
"Language": "Nyelv",
163163
"Arabic": "Arab",

Diff for: static/translations/messages_id.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Pengaturan",
160-
"Dark theme": "Mode malam",
160+
"Night mode": "Mode malam",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Bahasa",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_it.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Per saperne di più.",
158158
"Full profile": "Profilo completo",
159159
"Settings": "Impostazioni",
160-
"Dark theme": "Modalità notturna",
160+
"Night mode": "Modalità notturna",
161161
"Open links with in-app browser": "Apri i link con il browser dell'app",
162162
"Language": "Lingua",
163163
"Arabic": "Arabo",

Diff for: static/translations/messages_ja.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "詳細",
158158
"Full profile": "全てのプロフィール",
159159
"Settings": "設定",
160-
"Dark theme": "夜間モード",
160+
"Night mode": "夜間モード",
161161
"Open links with in-app browser": "リンクをアプリ内ブラウザで開く",
162162
"Language": "言語",
163163
"Arabic": "アラビア語",

Diff for: static/translations/messages_ko.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "좀 더 알아보기",
158158
"Full profile": "Full profile",
159159
"Settings": "설정",
160-
"Dark theme": "야간모드",
160+
"Night mode": "야간모드",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "언어",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_lt.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Nustatymai",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_ml.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "സജ്ജീകരണങ്ങൾ",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_mn.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Илүү ихийг харах",
158158
"Full profile": "Full profile",
159159
"Settings": "Тохиргоо",
160-
"Dark theme": "Хар төлөв",
160+
"Night mode": "Хар төлөв",
161161
"Open links with in-app browser": "Өөр browser дээр холбоосыг нээх",
162162
"Language": "Хэл",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_my.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_nl.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Instellingen",
160-
"Dark theme": "Nachtstand",
160+
"Night mode": "Nachtstand",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Taal",
163163
"Arabic": "Arabisch",

Diff for: static/translations/messages_no.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Innstillinger",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_pa.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_pcm.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Settings",
160-
"Dark theme": "Dark theme",
160+
"Night mode": "Night mode",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Language",
163163
"Arabic": "Arabic",

Diff for: static/translations/messages_pl.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"Learn more": "Learn more",
158158
"Full profile": "Full profile",
159159
"Settings": "Ustawienia",
160-
"Dark theme": "Tryb nocny",
160+
"Night mode": "Tryb nocny",
161161
"Open links with in-app browser": "Open links with in-app browser",
162162
"Language": "Język",
163163
"Arabic": "Arabski",

0 commit comments

Comments
 (0)