mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-30 21:13:28 +01:00 
			
		
		
		
	Restore Oxford comma but only for English (#2245)
This commit is contained in:
		| @@ -327,7 +327,7 @@ | |||||||
|     "smartname": "Name (Smart)", |     "smartname": "Name (Smart)", | ||||||
|     "sortMethod": "Sort Method", |     "sortMethod": "Sort Method", | ||||||
|     "welcome": "Welcome", |     "welcome": "Welcome", | ||||||
|     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions and other resources that will help you understand how to use the app.", |     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", | ||||||
|     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", |     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", | ||||||
|     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", |     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", | ||||||
|     "foregroundService": "Obtainium foreground service", |     "foregroundService": "Obtainium foreground service", | ||||||
|   | |||||||
| @@ -327,7 +327,7 @@ | |||||||
|     "smartname": "Name (Smart)", |     "smartname": "Name (Smart)", | ||||||
|     "sortMethod": "Sort Method", |     "sortMethod": "Sort Method", | ||||||
|     "welcome": "Welcome", |     "welcome": "Welcome", | ||||||
|     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions and other resources that will help you understand how to use the app.", |     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", | ||||||
|     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", |     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", | ||||||
|     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", |     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", | ||||||
|     "foregroundService": "Obtainium foreground service", |     "foregroundService": "Obtainium foreground service", | ||||||
|   | |||||||
| @@ -327,7 +327,7 @@ | |||||||
|     "smartname": "Name (smart)", |     "smartname": "Name (smart)", | ||||||
|     "sortMethod": "Sort method", |     "sortMethod": "Sort method", | ||||||
|     "welcome": "Welcome", |     "welcome": "Welcome", | ||||||
|     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions and other resources that will help you understand how to use the app.", |     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", | ||||||
|     "batteryOptimizationNote": "Note that background downloads may work more reliably if you switch to the \"foreground service\" in the Obtainium settings and/or disable battery optimization for Obtainium in your OS settings.", |     "batteryOptimizationNote": "Note that background downloads may work more reliably if you switch to the \"foreground service\" in the Obtainium settings and/or disable battery optimization for Obtainium in your OS settings.", | ||||||
|     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", |     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", | ||||||
|     "foregroundService": "Obtainium foreground service", |     "foregroundService": "Obtainium foreground service", | ||||||
|   | |||||||
| @@ -327,7 +327,7 @@ | |||||||
|     "smartname": "Name (Smart)", |     "smartname": "Name (Smart)", | ||||||
|     "sortMethod": "Sort Method", |     "sortMethod": "Sort Method", | ||||||
|     "welcome": "Welcome", |     "welcome": "Welcome", | ||||||
|     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions and other resources that will help you understand how to use the app.", |     "documentationLinksNote": "The Obtainium GitHub page linked below contains links to videos, articles, discussions, and other resources that will help you understand how to use the app.", | ||||||
|     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", |     "batteryOptimizationNote": "Note that background downloads may work more reliably if you disable OS battery optimizations for Obtainium.", | ||||||
|     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", |     "fileDeletionError": "Failed to delete file (try deleting it manually then try again): \"{}\"", | ||||||
|     "foregroundService": "Obtainium foreground service", |     "foregroundService": "Obtainium foreground service", | ||||||
|   | |||||||
| @@ -158,6 +158,7 @@ void showError(dynamic e, BuildContext context) { | |||||||
| } | } | ||||||
|  |  | ||||||
| String list2FriendlyString(List<String> list) { | String list2FriendlyString(List<String> list) { | ||||||
|  |   var isEnglish = tr('and') == 'and'; // Quick hack, find better way; | ||||||
|   return list.length == 2 |   return list.length == 2 | ||||||
|       ? '${list[0]} ${tr('and')} ${list[1]}' |       ? '${list[0]} ${tr('and')} ${list[1]}' | ||||||
|       : list |       : list | ||||||
| @@ -169,7 +170,7 @@ String list2FriendlyString(List<String> list) { | |||||||
|                   (e.key == list.length - 1 |                   (e.key == list.length - 1 | ||||||
|                       ? '' |                       ? '' | ||||||
|                       : e.key == list.length - 2 |                       : e.key == list.length - 2 | ||||||
|                       ? ' and ' |                       ? '${isEnglish ? ',' : ''} and ' | ||||||
|                       : ', '), |                       : ', '), | ||||||
|             ) |             ) | ||||||
|             .join(''); |             .join(''); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user