From 44d6c4735f0e9e5a161efb6b400f87b4e7d3b4f3 Mon Sep 17 00:00:00 2001 From: DJDoubleD <34967020+DJDoubleD@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:03:56 +0200 Subject: [PATCH] Add Crowdin Tile in About screen --- assets/fonts/ReFreezerIcons.ttf | Bin 2188 -> 2712 bytes lib/fonts/refreezer_icons.dart | 1 + lib/languages/crowdin.dart | 11 ++++-- lib/languages/en_us.dart | 65 +++++++++++--------------------- lib/ui/settings_screen.dart | 29 +++++++++----- translations/refreezer.json | 4 +- 6 files changed, 54 insertions(+), 56 deletions(-) diff --git a/assets/fonts/ReFreezerIcons.ttf b/assets/fonts/ReFreezerIcons.ttf index b8dd06f8d4767877ce0bc73f517598a27900a76b..56cd6eba5d0dac0e3a8a4600833836c36cef673c 100644 GIT binary patch delta 938 zcmYLEO>7fa5T1E&-+SKm+D;sM*RhE=S;xBynEYVJRUiter6`q(Xah=9RaNAgq_MD* zh)|ILk}D4F1w>E|Z~`QHrD~NcsyHE0sZwv1+6z)Zas`JT;7XX?MCy!Y-psu3o1Yuq zchj4N_67jn0D#$gtG4>@$X7d*zX@vJHa8Z_GqDK(PXGMc(n9V0Q12%V!agUfE>S^E z@-HZUOg6aGy0o5nKoQ^za$U`pdW``*CGPi>8?D;3tX+ETJo$mJpAlgC_T$1w8X$#afB$#*{(NHcEkt>TDzKxofBt`WpYaYClt+L@ zh7#~J_zC2ei;s|P{fYgvdsGO3oU9Z=0O!IX05en#XeD|LnmR`fybu$v(P6v0038TC z;k3{*;M*ry3@0j-211R41;Zt&S!dsZy*m3A4hQ%Up5ku++w1%$wj}@^@dq8z4HY;I z%diO#0gA3ajN_H+ac0?;ok!`97CfKygDUA1mXFxwJf@}c3a(T#f#iDJ5aD|c2BbY= z9FANH75t)?Qi(qcmCUk*{ey|L? zUCee{N@#ve6TZag4pvf>bJ?4p7~hh&8OXbi9aT!&uj1LHUecw0@cP27)t4^cJm z8ZyRk#qJ$#@UBSW-Cu?Nz61HfLB=_gxl@M*bX3s@)4tYCr`SG&`FNINl1VpR89h{R zl1aKl;;&qn%oxh%uAUr^n@J~@mMECfWuF*swT+_5eGM6M i)KGxY+_>1Nug$j_b+xwi-Qr?%LDes=Tt44e26zwI&6RKf delta 375 zcmYjMze@sP7=FI{uI^I7Bm}b|Ne6=M`CyOVXhi4eIY7GRPg$J z)&Jk+NVy@`p^R0Y@t(vs)L=o}3K2YuOz///<', + 'Please wait...': 'Pwease wait... x3', 'Duration': 'Duwation', 'Sort': 'Sowt', 'Your ARL might be expired, try logging out and logging back in using new ARL or browser.': @@ -8821,7 +8825,8 @@ const crowdin = { 'Application Log': 'Appwication wog', 'Are you sure you want to log out?': 'Awe uwu suwe uwu wawnt tuwu wog out?', 'Download failed!': 'Downwoad faiwed! :(', - 'Permission denied, download canceled!': 'Pewmission denied, downwoad cancewed!' + 'Permission denied, download canceled!': 'Pewmission denied, downwoad cancewed!', + 'Help translating this app on Crowdin!': 'I need your help uwu, please translate this app on crowdin! >w<' }, 'vi_vi': { 'Home': 'Trang chủ', diff --git a/lib/languages/en_us.dart b/lib/languages/en_us.dart index caead08..bb124f8 100644 --- a/lib/languages/en_us.dart +++ b/lib/languages/en_us.dart @@ -3,8 +3,7 @@ const language_en_us = { 'Home': 'Home', 'Search': 'Search', 'Library': 'Library', - "Offline mode, can't play flow or smart track lists.": - "Offline mode, can't play flow or smart track lists.", + "Offline mode, can't play flow or smart track lists.": "Offline mode, can't play flow or smart track lists.", 'Added to library': 'Added to library', 'Download': 'Download', 'Disk': 'Disk', @@ -22,20 +21,16 @@ const language_en_us = { 'Post processing...': 'Post processing...', 'Done': 'Done', 'Delete': 'Delete', - 'Are you sure you want to delete this download?': - 'Are you sure you want to delete this download?', + 'Are you sure you want to delete this download?': 'Are you sure you want to delete this download?', 'Cancel': 'Cancel', 'Downloads': 'Downloads', 'Clear queue': 'Clear queue', - "This won't delete currently downloading item": - "This won't delete currently downloading item", - 'Are you sure you want to delete all queued downloads?': - 'Are you sure you want to delete all queued downloads?', + "This won't delete currently downloading item": "This won't delete currently downloading item", + 'Are you sure you want to delete all queued downloads?': 'Are you sure you want to delete all queued downloads?', 'Clear downloads history': 'Clear downloads history', 'WARNING: This will only clear non-offline (external downloads)': 'WARNING: This will only clear non-offline (external downloads)', - 'Please check your connection and try again later...': - 'Please check your connection and try again later...', + 'Please check your connection and try again later...': 'Please check your connection and try again later...', 'Show more': 'Show more', 'Importer': 'Importer', 'Currently supporting only Spotify, with 100 tracks limit': @@ -63,15 +58,13 @@ const language_en_us = { 'Favorites': 'Favorites', 'All offline tracks': 'All offline tracks', 'Create new playlist': 'Create new playlist', - 'Cannot create playlists in offline mode': - 'Cannot create playlists in offline mode', + 'Cannot create playlists in offline mode': 'Cannot create playlists in offline mode', 'Error': 'Error', 'Error logging in! Please check your token and internet connection and try again.': 'Error logging in! Please check your token and internet connection and try again.', 'Dismiss': 'Dismiss', 'Welcome to': 'Welcome to', - 'Please login using your Deezer account.': - 'Please login using your Deezer account.', + 'Please login using your Deezer account.': 'Please login using your Deezer account.', 'Login using browser': 'Login using browser', 'Login using token': 'Login using token', 'Enter ARL': 'Enter ARL', @@ -80,8 +73,7 @@ const language_en_us = { "If you don't have account, you can register on deezer.com for free.": "If you don't have account, you can register on deezer.com for free.", 'Open in browser': 'Open in browser', - "By using this app, you don't agree with the Deezer ToS": - "By using this app, you don't agree with the Deezer ToS", + "By using this app, you don't agree with the Deezer ToS": "By using this app, you don't agree with the Deezer ToS", 'Play next': 'Play next', 'Add to queue': 'Add to queue', 'Add track to favorites': 'Add track to favorites', @@ -138,8 +130,7 @@ const language_en_us = { 'Wifi streaming': 'Wifi streaming', 'External downloads': 'External downloads', 'Content language': 'Content language', - 'Not app language, used in headers. Now': - 'Not app language, used in headers. Now', + 'Not app language, used in headers. Now': 'Not app language, used in headers. Now', 'Select language': 'Select language', 'Content country': 'Content country', 'Country used in headers. Now': 'Country used in headers. Now', @@ -148,8 +139,7 @@ const language_en_us = { 'Send track listen logs to Deezer, enable it for features like Flow to work properly', 'Offline mode': 'Offline mode', 'Will be overwritten on start.': 'Will be overwritten on start.', - 'Error logging in, check your internet connections.': - 'Error logging in, check your internet connections.', + 'Error logging in, check your internet connections.': 'Error logging in, check your internet connections.', 'Logging in...': 'Logging in...', 'Download path': 'Download path', 'Downloads naming': 'Downloads naming', @@ -162,8 +152,7 @@ const language_en_us = { 'Separate albums by discs': 'Separate albums by disks', 'Overwrite already downloaded files': 'Overwrite already downloaded files', 'Copy ARL': 'Copy ARL', - 'Copy userToken/ARL Cookie for use in other apps.': - 'Copy userToken/ARL Cookie for use in other apps.', + 'Copy userToken/ARL Cookie for use in other apps.': 'Copy userToken/ARL Cookie for use in other apps.', 'Copied': 'Copied', 'Log out': 'Log out', 'Due to plugin incompatibility, login using browser is unavailable without restart.': @@ -175,14 +164,12 @@ const language_en_us = { 'Go up': 'Go up', 'Permission denied': 'Permission denied', 'Language': 'Language', - 'Language changed, please restart ReFreezer to apply!': - 'Language changed, please restart ReFreezer to apply!', + 'Language changed, please restart ReFreezer to apply!': 'Language changed, please restart ReFreezer to apply!', 'Importing...': 'Importing...', 'Radio': 'Radio', 'Flow': 'Flow', 'Track is not available on Deezer!': 'Track is not available on Deezer!', - 'Failed to download track! Please restart.': - 'Failed to download track! Please restart.', + 'Failed to download track! Please restart.': 'Failed to download track! Please restart.', //0.5.0 Strings: 'Storage permission denied!': 'Storage permission denied!', @@ -203,15 +190,13 @@ const language_en_us = { //Updated 0.5.1 'Download threads': 'Concurrent downloads', //0.5.0 - 'Lyrics unavailable, empty or failed to load!': - 'Lyrics unavailable, empty or failed to load!', + 'Lyrics unavailable, empty or failed to load!': 'Lyrics unavailable, empty or failed to load!', 'About': 'About', 'Telegram Channel': 'Telegram Channel', 'To get latest releases': 'To get latest releases', 'Official chat': 'Official chat', 'Telegram Group': 'Telegram Group', - 'Huge thanks to all the contributors! <3': - 'Huge thanks to all the contributors! <3', + 'Huge thanks to all the contributors! <3': 'Huge thanks to all the contributors! <3', 'Edit playlist': 'Edit playlist', 'Update': 'Update', 'Playlist updated!': 'Playlist updated!', @@ -243,8 +228,7 @@ const language_en_us = { //0.5.6 Strings: 'Create .nomedia files': 'Create .nomedia files', - 'To prevent gallery being filled with album art': - 'To prevent gallery being filled with album art', + 'To prevent gallery being filled with album art': 'To prevent gallery being filled with album art', //0.5.7 Strings: 'Sleep timer': 'Sleep timer', @@ -286,8 +270,7 @@ const language_en_us = { 'Current version: ': 'Current version: ', 'Unsupported platform!': 'Unsupported platform!', 'ReFreezer Updates': 'ReFreezer Updates', - 'Update to latest version in the settings.': - 'Update to latest version in the settings.', + 'Update to latest version in the settings.': 'Update to latest version in the settings.', 'Release date': 'Release date', //0.6.4 Strings: @@ -302,8 +285,7 @@ const language_en_us = { 'Official Discord server': 'Official Discord server', //0.6.6 - 'Restart of app is required to properly log out!': - 'Restart of app is required to properly log out!', + 'Restart of app is required to properly log out!': 'Restart of app is required to properly log out!', 'Artist separator': 'Artist separator', 'Singleton naming': 'Standalone tracks filename', @@ -429,13 +411,11 @@ const language_en_us = { 'Your ARL might be expired, try logging out and logging back in using new ARL or browser.', //0.7.05 - 'The original freezer development team': - 'The original freezer development team', + 'The original freezer development team': 'The original freezer development team', 'Donate': 'Donate', 'You should rather support your favorite artists, instead of this app!': 'You should rather support your favorite artists, instead of this app!', - 'No really, go support your favorite artists instead ;)': - 'No really, go support your favorite artists instead ;)', + 'No really, go support your favorite artists instead ;)': 'No really, go support your favorite artists instead ;)', 'Storage permission is required to download content.\nPlease open settings and grant storage permission to ReFreezer.': 'Storage permission is required to download content.\nPlease open settings and grant storage permission to ReFreezer.', 'Open system settings': 'Open system settings', @@ -446,7 +426,8 @@ const language_en_us = { 'Download failed!': 'Download failed!', // 0.7.14 - 'Permission denied, download canceled!': - 'Permission denied, download canceled!', + 'Permission denied, download canceled!': 'Permission denied, download canceled!', + 'Crowdin': 'Crowdin', + 'Help translating this app on Crowdin!': 'Help translating this app on Crowdin!' } }; diff --git a/lib/ui/settings_screen.dart b/lib/ui/settings_screen.dart index 4e3cea9..36c1aac 100644 --- a/lib/ui/settings_screen.dart +++ b/lib/ui/settings_screen.dart @@ -26,6 +26,7 @@ import 'package:url_launcher/url_launcher_string.dart'; import '../api/cache.dart'; import '../api/deezer.dart'; +import '../fonts/refreezer_icons.dart'; import '../main.dart'; import '../utils/env.dart'; import '../utils/navigator_keys.dart'; @@ -1571,7 +1572,6 @@ class _CreditsScreenState extends State { static final List> translators = [ // ['Andrea', 'Italian'], ['ovosimpatico', 'Portuguese & Spanish'], - ['All Crowdin contributors', 'Various languages'], ]; static final List> freezerTranslators = [ @@ -1654,6 +1654,15 @@ class _CreditsScreenState extends State { }, ), ListTile( + title: Text('Crowdin'.i18n), + subtitle: Text('Help translating this app on Crowdin!'.i18n), + leading: const Icon(ReFreezerIcons.crowdin, color: Color(0xffbdc1c6), size: 36.0), + onTap: () { + launchUrlString('https://crowdin.com/project/refreezer'); + }, + ), + ListTile( + isThreeLine: true, title: Text('Donate'.i18n), subtitle: Text('You should rather support your favorite artists, instead of this app!'.i18n), leading: const Icon(FontAwesome5.paypal, color: Colors.blue, size: 36.0), @@ -1677,7 +1686,6 @@ class _CreditsScreenState extends State { // launchUrlString('https://paypal.me/exttex'); }, ), - const Padding(padding: EdgeInsets.all(8.0)), const FreezerDivider(), ...List.generate( translators.length, @@ -1766,17 +1774,18 @@ class _CreditsScreenState extends State { title: Text(freezerTranslators[i][0]), subtitle: Text(freezerTranslators[i][1]), )), - Padding( - padding: const EdgeInsets.fromLTRB(0, 4, 0, 8), - child: Text( - 'Huge thanks to all the contributors! <3'.i18n, - textAlign: TextAlign.center, - style: const TextStyle(fontSize: 16.0), - ), - ) ], ), const FreezerDivider(), + Padding( + padding: const EdgeInsets.fromLTRB(0, 4, 0, 8), + child: Text( + 'Huge thanks to all the contributors! <3'.i18n, + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 16.0), + ), + ), + const FreezerDivider(), ], ), ); diff --git a/translations/refreezer.json b/translations/refreezer.json index d99c87d..1c8c0c9 100644 --- a/translations/refreezer.json +++ b/translations/refreezer.json @@ -350,5 +350,7 @@ "Application Log": "Application Log", "Are you sure you want to log out?": "Are you sure you want to log out?", "Download failed!": "Download failed!", - "Permission denied, download canceled!": "Permission denied, download canceled!" + "Permission denied, download canceled!": "Permission denied, download canceled!", + "Crowdin": "Crowdin", + "Help translating this app on Crowdin!": "Help translating this app on Crowdin!" }