Skip to content

Commit 5f07311

Browse files
committed
[red] cover visible file multi-delete
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 3766aaa commit 5f07311

6 files changed

Lines changed: 1679 additions & 0 deletions

File tree

‎app/lib/localization/arb/app_en.arb‎

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,6 +1601,44 @@
16011601
"@filesGoUp": {
16021602
"description": "Tooltip for the navigate-up action in the file explorer; bounded at the board's filesystem root."
16031603
},
1604+
"filesActionSelect": "Select files",
1605+
"@filesActionSelect": {
1606+
"description": "Discoverable action that enters the Files regular-file multi-selection mode."
1607+
},
1608+
"filesSelectionCancel": "Cancel selection",
1609+
"@filesSelectionCancel": {
1610+
"description": "Action that exits Files multi-selection mode without deleting anything."
1611+
},
1612+
"filesSelectionSelectedCount": "{count, plural, =0{No files selected} =1{1 file selected} other{{count} files selected}}",
1613+
"@filesSelectionSelectedCount": {
1614+
"description": "Live selected-file count in the Files contextual selection bar.",
1615+
"placeholders": {
1616+
"count": {"type": "int", "example": "3"}
1617+
}
1618+
},
1619+
"filesSelectionSelectAllShown": "{count, plural, =1{Select the 1 shown file} other{Select all {count} shown files}}",
1620+
"@filesSelectionSelectAllShown": {
1621+
"description": "Tooltip and semantics for selecting every eligible regular file present in the rendered folder listing; omitted/truncated entries and folders are not implied.",
1622+
"placeholders": {
1623+
"count": {"type": "int", "example": "5"}
1624+
}
1625+
},
1626+
"filesSelectionClearAll": "Clear file selection",
1627+
"@filesSelectionClearAll": {
1628+
"description": "Tooltip and semantics for clearing every currently selected board file while remaining in selection mode."
1629+
},
1630+
"filesSelectionDelete": "Delete selected files",
1631+
"@filesSelectionDelete": {
1632+
"description": "Destructive action that reviews the selected board files before a sequential bulk delete."
1633+
},
1634+
"filesSelectionFilesOnly": "Folders cannot be selected for bulk delete.",
1635+
"@filesSelectionFilesOnly": {
1636+
"description": "Selection-mode guidance for a folder row; folders retain the separate one-at-a-time empty-folder delete behavior."
1637+
},
1638+
"filesEntryProtected": "Protected by the board",
1639+
"@filesEntryProtected": {
1640+
"description": "Tooltip and semantics for a firmware control-plane or transfer-scratch entry that Files presents as locked and non-editable."
1641+
},
16041642
"filesOpenInEditor": "Open in editor",
16051643
"@filesOpenInEditor": {
16061644
"description": "Action that downloads a board file (getFile) and opens it in the editor buffer."
@@ -1681,6 +1719,48 @@
16811719
"@filesDeleteConfirmBody": {
16821720
"description": "Body of the delete-confirmation dialog, warning the deletion is permanent."
16831721
},
1722+
"filesDeleteSelectedConfirmTitle": "{count, plural, =1{Delete 1 selected file?} other{Delete {count} selected files?}}",
1723+
"@filesDeleteSelectedConfirmTitle": {
1724+
"description": "Title of the exact multi-file delete confirmation.",
1725+
"placeholders": {
1726+
"count": {"type": "int", "example": "3"}
1727+
}
1728+
},
1729+
"filesDeleteSelectedConfirmBody": "This permanently removes the selected files from {cwd}. This cannot be undone.",
1730+
"@filesDeleteSelectedConfirmBody": {
1731+
"description": "Permanent-removal warning in the multi-file delete confirmation. The board cwd is a verbatim technical path.",
1732+
"placeholders": {
1733+
"cwd": {"type": "String", "example": "/examples"}
1734+
}
1735+
},
1736+
"filesDeleteSelectedListLabel": "Files to delete",
1737+
"@filesDeleteSelectedListLabel": {
1738+
"description": "Accessible heading above the exact ordered filenames in the multi-delete confirmation."
1739+
},
1740+
"filesDeleteSelectedProgress": "Deleting {name} · {completed} of {total} completed",
1741+
"@filesDeleteSelectedProgress": {
1742+
"description": "Item-level progress shown while a sequential file-delete batch is active. The filename is verbatim technical text.",
1743+
"placeholders": {
1744+
"name": {"type": "String", "example": "blink.py"},
1745+
"completed": {"type": "int", "example": "1"},
1746+
"total": {"type": "int", "example": "3"}
1747+
}
1748+
},
1749+
"filesDeleteSelectedComplete": "{count, plural, =1{1 file deleted} other{{count} files deleted}}",
1750+
"@filesDeleteSelectedComplete": {
1751+
"description": "Polite terminal announcement after a complete multi-file delete.",
1752+
"placeholders": {
1753+
"count": {"type": "int", "example": "3"}
1754+
}
1755+
},
1756+
"filesDeleteSelectedStopped": "{deleted, plural, =0{No files were confirmed deleted.} =1{1 file was deleted.} other{{deleted} files were deleted.}} {remaining, plural, =1{1 file remains selected.} other{{remaining} files remain selected.}} Review the Files list before trying again.",
1757+
"@filesDeleteSelectedStopped": {
1758+
"description": "Honest failed/partial multi-delete summary; the separate typed file error explains why the batch stopped.",
1759+
"placeholders": {
1760+
"deleted": {"type": "int", "example": "1"},
1761+
"remaining": {"type": "int", "example": "2"}
1762+
}
1763+
},
16841764

16851765
"commonCancel": "Cancel",
16861766
"@commonCancel": {

‎app/lib/localization/gen/app_localizations.dart‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,6 +2013,54 @@ abstract class AppLocalizations {
20132013
/// **'Up one folder'**
20142014
String get filesGoUp;
20152015

2016+
/// Discoverable action that enters the Files regular-file multi-selection mode.
2017+
///
2018+
/// In en, this message translates to:
2019+
/// **'Select files'**
2020+
String get filesActionSelect;
2021+
2022+
/// Action that exits Files multi-selection mode without deleting anything.
2023+
///
2024+
/// In en, this message translates to:
2025+
/// **'Cancel selection'**
2026+
String get filesSelectionCancel;
2027+
2028+
/// Live selected-file count in the Files contextual selection bar.
2029+
///
2030+
/// In en, this message translates to:
2031+
/// **'{count, plural, =0{No files selected} =1{1 file selected} other{{count} files selected}}'**
2032+
String filesSelectionSelectedCount(int count);
2033+
2034+
/// Tooltip and semantics for selecting every eligible regular file present in the rendered folder listing; omitted/truncated entries and folders are not implied.
2035+
///
2036+
/// In en, this message translates to:
2037+
/// **'{count, plural, =1{Select the 1 shown file} other{Select all {count} shown files}}'**
2038+
String filesSelectionSelectAllShown(int count);
2039+
2040+
/// Tooltip and semantics for clearing every currently selected board file while remaining in selection mode.
2041+
///
2042+
/// In en, this message translates to:
2043+
/// **'Clear file selection'**
2044+
String get filesSelectionClearAll;
2045+
2046+
/// Destructive action that reviews the selected board files before a sequential bulk delete.
2047+
///
2048+
/// In en, this message translates to:
2049+
/// **'Delete selected files'**
2050+
String get filesSelectionDelete;
2051+
2052+
/// Selection-mode guidance for a folder row; folders retain the separate one-at-a-time empty-folder delete behavior.
2053+
///
2054+
/// In en, this message translates to:
2055+
/// **'Folders cannot be selected for bulk delete.'**
2056+
String get filesSelectionFilesOnly;
2057+
2058+
/// Tooltip and semantics for a firmware control-plane or transfer-scratch entry that Files presents as locked and non-editable.
2059+
///
2060+
/// In en, this message translates to:
2061+
/// **'Protected by the board'**
2062+
String get filesEntryProtected;
2063+
20162064
/// Action that downloads a board file (getFile) and opens it in the editor buffer.
20172065
///
20182066
/// In en, this message translates to:
@@ -2085,6 +2133,42 @@ abstract class AppLocalizations {
20852133
/// **'This permanently removes it from the board.'**
20862134
String get filesDeleteConfirmBody;
20872135

2136+
/// Title of the exact multi-file delete confirmation.
2137+
///
2138+
/// In en, this message translates to:
2139+
/// **'{count, plural, =1{Delete 1 selected file?} other{Delete {count} selected files?}}'**
2140+
String filesDeleteSelectedConfirmTitle(int count);
2141+
2142+
/// Permanent-removal warning in the multi-file delete confirmation. The board cwd is a verbatim technical path.
2143+
///
2144+
/// In en, this message translates to:
2145+
/// **'This permanently removes the selected files from {cwd}. This cannot be undone.'**
2146+
String filesDeleteSelectedConfirmBody(String cwd);
2147+
2148+
/// Accessible heading above the exact ordered filenames in the multi-delete confirmation.
2149+
///
2150+
/// In en, this message translates to:
2151+
/// **'Files to delete'**
2152+
String get filesDeleteSelectedListLabel;
2153+
2154+
/// Item-level progress shown while a sequential file-delete batch is active. The filename is verbatim technical text.
2155+
///
2156+
/// In en, this message translates to:
2157+
/// **'Deleting {name} · {completed} of {total} completed'**
2158+
String filesDeleteSelectedProgress(String name, int completed, int total);
2159+
2160+
/// Polite terminal announcement after a complete multi-file delete.
2161+
///
2162+
/// In en, this message translates to:
2163+
/// **'{count, plural, =1{1 file deleted} other{{count} files deleted}}'**
2164+
String filesDeleteSelectedComplete(int count);
2165+
2166+
/// Honest failed/partial multi-delete summary; the separate typed file error explains why the batch stopped.
2167+
///
2168+
/// In en, this message translates to:
2169+
/// **'{deleted, plural, =0{No files were confirmed deleted.} =1{1 file was deleted.} other{{deleted} files were deleted.}} {remaining, plural, =1{1 file remains selected.} other{{remaining} files remain selected.}} Review the Files list before trying again.'**
2170+
String filesDeleteSelectedStopped(int deleted, int remaining);
2171+
20882172
/// Generic Cancel button, shared across dialogs.
20892173
///
20902174
/// In en, this message translates to:

‎app/lib/localization/gen/app_localizations_en.dart‎

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,48 @@ class AppLocalizationsEn extends AppLocalizations {
11741174
@override
11751175
String get filesGoUp => 'Up one folder';
11761176

1177+
@override
1178+
String get filesActionSelect => 'Select files';
1179+
1180+
@override
1181+
String get filesSelectionCancel => 'Cancel selection';
1182+
1183+
@override
1184+
String filesSelectionSelectedCount(int count) {
1185+
String _temp0 = intl.Intl.pluralLogic(
1186+
count,
1187+
locale: localeName,
1188+
other: '$count files selected',
1189+
one: '1 file selected',
1190+
zero: 'No files selected',
1191+
);
1192+
return '$_temp0';
1193+
}
1194+
1195+
@override
1196+
String filesSelectionSelectAllShown(int count) {
1197+
String _temp0 = intl.Intl.pluralLogic(
1198+
count,
1199+
locale: localeName,
1200+
other: 'Select all $count shown files',
1201+
one: 'Select the 1 shown file',
1202+
);
1203+
return '$_temp0';
1204+
}
1205+
1206+
@override
1207+
String get filesSelectionClearAll => 'Clear file selection';
1208+
1209+
@override
1210+
String get filesSelectionDelete => 'Delete selected files';
1211+
1212+
@override
1213+
String get filesSelectionFilesOnly =>
1214+
'Folders cannot be selected for bulk delete.';
1215+
1216+
@override
1217+
String get filesEntryProtected => 'Protected by the board';
1218+
11771219
@override
11781220
String get filesOpenInEditor => 'Open in editor';
11791221

@@ -1221,6 +1263,59 @@ class AppLocalizationsEn extends AppLocalizations {
12211263
String get filesDeleteConfirmBody =>
12221264
'This permanently removes it from the board.';
12231265

1266+
@override
1267+
String filesDeleteSelectedConfirmTitle(int count) {
1268+
String _temp0 = intl.Intl.pluralLogic(
1269+
count,
1270+
locale: localeName,
1271+
other: 'Delete $count selected files?',
1272+
one: 'Delete 1 selected file?',
1273+
);
1274+
return '$_temp0';
1275+
}
1276+
1277+
@override
1278+
String filesDeleteSelectedConfirmBody(String cwd) {
1279+
return 'This permanently removes the selected files from $cwd. This cannot be undone.';
1280+
}
1281+
1282+
@override
1283+
String get filesDeleteSelectedListLabel => 'Files to delete';
1284+
1285+
@override
1286+
String filesDeleteSelectedProgress(String name, int completed, int total) {
1287+
return 'Deleting $name · $completed of $total completed';
1288+
}
1289+
1290+
@override
1291+
String filesDeleteSelectedComplete(int count) {
1292+
String _temp0 = intl.Intl.pluralLogic(
1293+
count,
1294+
locale: localeName,
1295+
other: '$count files deleted',
1296+
one: '1 file deleted',
1297+
);
1298+
return '$_temp0';
1299+
}
1300+
1301+
@override
1302+
String filesDeleteSelectedStopped(int deleted, int remaining) {
1303+
String _temp0 = intl.Intl.pluralLogic(
1304+
deleted,
1305+
locale: localeName,
1306+
other: '$deleted files were deleted.',
1307+
one: '1 file was deleted.',
1308+
zero: 'No files were confirmed deleted.',
1309+
);
1310+
String _temp1 = intl.Intl.pluralLogic(
1311+
remaining,
1312+
locale: localeName,
1313+
other: '$remaining files remain selected.',
1314+
one: '1 file remains selected.',
1315+
);
1316+
return '$_temp0 $_temp1 Review the Files list before trying again.';
1317+
}
1318+
12241319
@override
12251320
String get commonCancel => 'Cancel';
12261321

0 commit comments

Comments
 (0)