deleteLocale method
Deletes a locale file permanently.
Implementation
Future<void> deleteLocale(String locale, BuildContext? context) async {
// 1. Optimistic update - immediate UI feedback
queue.removeLocaleOptimistic(locale);
notifyListeners();
try {
await _client.deleteLocale(locale: locale);
} catch (e) {
// 2. On error: rollback and refresh
await queue.refresh(reloadMeta: true);
notifyListeners();
// Error will be shown by the caller
rethrow;
}
}