Skip to content

Commit 65bdcf1

Browse files
dudua99Y-PLONI
authored andcommitted
הסרת קוד מת: הודעות דיווח ו-replaceKind שנשארו בלי שימוש אחרי Otzaria#4132
- ReportMessages: savedForLater, appReportQueued, appReportRejected, appReportCrashDismissed, appReportHangDismissed ושלוש עטיפות התמונות (appReportImageTooLarge, appReportTooManyImages, appReportImagesTotalTooLarge). הקוראים האחרונים הוחלפו ב-e11711da3 בתבניות המתורגמות או בהודעות החדשות (reportRejectedPreserved, appReportDraftDiscarded). - PendingReportStore.replaceKind: הקורא היחיד היה saveDraft של AppReportService. ב-e11711da3 הטיוטות עברו ל-ReportDraftStore. - CommonMessages.cannotOpenPhoneApp ו-phoneAppOpenError: חזרו ב-e11711da3 יחד עם reporting_numbers_widget. ב-66ae3b3d4 הווידג'ט הוסר שוב, אבל הקבועים נשארו (ב-b14573591 הם הוסרו יחד איתו). - חמשת התרגומים של המחרוזות שהוסרו נמחקו מ-settings_en.arb, והקטלוג נוצר מחדש. בלי זה, הבדיקה "אין בקטלוג תרגום שאינו בשימוש" נכשלת. - בתיעוד של ReportMessages הוסר "טלפוני" מרשימת מסלולי הדיווח.
1 parent 0f0960a commit 65bdcf1

5 files changed

Lines changed: 1 addition & 59 deletions

File tree

‎lib/core/messages/common_messages.dart‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ abstract class CommonMessages {
6464
static const String diagnosticsSaveError =
6565
'שמירת האבחון נכשלה. האיסוף הופסק והנתונים נשמרו בזיכרון.';
6666

67-
// ── טלפון ───────────────────────────────────────────────────────────────
68-
static const String cannotOpenPhoneApp = 'לא ניתן לפתוח את אפליקציית הטלפון';
69-
static const String phoneAppOpenError = 'שגיאה בפתיחת אפליקציית הטלפון';
70-
7167
// ── ניווט ───────────────────────────────────────────────────────────────
7268
static const String pressBackAgainToExit = 'לחץ שוב על חזרה ליציאה';
7369

‎lib/core/messages/report_messages.dart‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// ריכוז כל ההודעות למשתמש של מנגנון דיווח הטעויות.
22
///
3-
/// כל טקסט שמוצג למשתמש בתהליך שליחת דיווח (ישיר, טלפוני, מייל וניהול
3+
/// כל טקסט שמוצג למשתמש בתהליך שליחת דיווח (ישיר, מייל וניהול
44
/// התור) מוגדר כאן בלבד — אין לכתוב מחרוזות דיווח בקבצי הפיצ'רים.
55
abstract class ReportMessages {
66
static const extendedReportQueued =
@@ -121,9 +121,6 @@ abstract class ReportMessages {
121121

122122
static String handleError(Object error) => 'שגיאה בטיפול בדיווח: $error';
123123

124-
static String savedForLater(int pendingCount) =>
125-
'הדיווח נשמר להמשך. יש כרגע $pendingCount דיווחים ממתינים בתור, וניתן לנהל את הדיווחים השמורים בהגדרות.';
126-
127124
// ── ניהול התור בהגדרות (system_settings_tab) ───────────────────────────
128125

129126
static const String markedAsSent = 'הדיווח סומן כנשלח.';
@@ -162,26 +159,13 @@ abstract class ReportMessages {
162159
? 'הדיווח צורף לדיווח קיים על אותה תקלה. תודה!'
163160
: 'הדיווח צורף לדיווח קיים מספר $issueNumber על אותה תקלה. תודה!';
164161

165-
static const String appReportQueued =
166-
'לא ניתן לשלוח כעת. הדיווח נשמר ויישלח אוטומטית בהמשך. '
167-
'ניתן לנהל את הדיווחים השמורים בהגדרות.';
168-
169-
static String appReportRejected(String? field) => field == null
170-
? 'השרת דחה את הדיווח, ולכן הוא לא נשמר לשליחה חוזרת.'
171-
: 'השרת דחה את הדיווח בגלל השדה "$field", ולכן הוא לא נשמר '
172-
'לשליחה חוזרת.';
173-
174162
static const String appReportTitleRequired = 'יש למלא כותרת לדיווח.';
175163
static const String appReportDescriptionRequired =
176164
'יש לתאר את התקלה כדי שנוכל לטפל בה.';
177165
static const String appReportEmailRequired =
178166
'יש למלא כתובת דואר אלקטרוני תקינה — בלעדיה לא נוכל לחזור אליכם.';
179167
static const String appReportInvalidEmail =
180168
'כתובת הדואר האלקטרוני אינה תקינה.';
181-
static const String appReportCrashDismissed =
182-
'הדיווח על הקריסה לא נשלח. ניתן לדווח בכל עת דרך ההגדרות.';
183-
static const String appReportHangDismissed =
184-
'הדיווח על התקיעה לא נשלח. ניתן לדווח בכל עת דרך ההגדרות.';
185169
static const String appReportDraftSaved =
186170
'הטיוטה נשמרה. היא תיפתח שוב בפעם הבאה שתפתחו את טופס הדיווח.';
187171
static const String appReportDraftDiscarded = 'הטיוטה נמחקה.';
@@ -194,14 +178,5 @@ abstract class ReportMessages {
194178
static const String appReportAttachmentsTooLargeTemplate =
195179
'הגודל הכולל של הצרופות מוגבל ל-{limit} MiB.';
196180
static const String appReportNoClipboardImage = 'אין תמונה נתמכת בלוח.';
197-
static String appReportImageTooLarge(int maxMegabytes) =>
198-
appReportImageTooLargeTemplate.replaceAll('{limit}', '$maxMegabytes');
199-
static String appReportTooManyImages(int maxCount) =>
200-
appReportTooManyImagesTemplate.replaceAll('{count}', '$maxCount');
201-
static String appReportImagesTotalTooLarge(int maxMegabytes) =>
202-
appReportAttachmentsTooLargeTemplate.replaceAll(
203-
'{limit}',
204-
'$maxMegabytes',
205-
);
206181
static const String appReportImageReadFailed = 'לא ניתן היה לקרוא את התמונה.';
207182
}

‎lib/core/user_state/pending_report_store.dart‎

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,6 @@ class PendingReportStore {
4444
return db.lastInsertRowId;
4545
}
4646

47-
/// מחליף את כל הרשומות מסוג [kind] ברשומה אחת, באותה עסקה.
48-
Future<void> replaceKind(String kind, Map<String, dynamic> payload) async {
49-
final db = await _database.database;
50-
final encoded = jsonEncode(payload);
51-
db.execute('BEGIN IMMEDIATE');
52-
try {
53-
db.execute('DELETE FROM pending_reports WHERE kind = ?', [kind]);
54-
db.execute(
55-
'INSERT INTO pending_reports (kind, payload_json, created_at) '
56-
'VALUES (?, ?, ?)',
57-
[kind, encoded, DateTime.now().millisecondsSinceEpoch],
58-
);
59-
db.execute('COMMIT');
60-
} catch (_) {
61-
db.execute('ROLLBACK');
62-
rethrow;
63-
}
64-
}
65-
6647
Future<Map<String, dynamic>> addIfAbsent(
6748
String kind,
6849
Map<String, dynamic> payload,

‎lib/settings/l10n/settings_catalogs.g.dart‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/settings/l10n/settings_en.arb‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,13 +1584,10 @@
15841584
"לא נמצאו דיווחים שמורים לשליחה.": "There are no queued reports to send.",
15851585
"אין דיווחים שמורים לייצוא.": "There are no queued reports to export.",
15861586
"סקריפט השליחה נשמר בהצלחה. לשליחת הדיווחים הפעילו את הקובץ במחשב מחובר.": "The sending script was saved. Run the file on a connected computer to send the reports.",
1587-
"לא ניתן לשלוח כעת. הדיווח נשמר ויישלח אוטומטית בהמשך. ניתן לנהל את הדיווחים השמורים בהגדרות.": "Sending is not available now. The report was queued for a later attempt. You can manage queued reports in Settings.",
15881587
"יש למלא כותרת לדיווח.": "Enter a report title.",
15891588
"יש לתאר את התקלה כדי שנוכל לטפל בה.": "Describe the problem so we can investigate it.",
15901589
"יש למלא כתובת דואר אלקטרוני תקינה — בלעדיה לא נוכל לחזור אליכם.": "Enter a valid email address so we can contact you.",
15911590
"כתובת הדואר האלקטרוני אינה תקינה.": "The email address is invalid.",
1592-
"הדיווח על הקריסה לא נשלח. ניתן לדווח בכל עת דרך ההגדרות.": "The crash report was not sent. You can report it later in Settings.",
1593-
"הדיווח על התקיעה לא נשלח. ניתן לדווח בכל עת דרך ההגדרות.": "The hang report was not sent. You can report it later in Settings.",
15941591
"הטיוטה נשמרה. היא תיפתח שוב בפעם הבאה שתפתחו את טופס הדיווח.": "The draft was saved. It will reopen next time you open the report form.",
15951592
"הטיוטה נמחקה.": "The draft was discarded.",
15961593
"לא ניתן לפתוח את הדיווח בדפדפן.": "The report could not be opened in the browser.",
@@ -1625,8 +1622,6 @@
16251622
"שרת הדיווחים החזיר {status}. הדיווח יישמר להמשך.": "The report server returned {status}. The report will be saved for another attempt.",
16261623
"תוכנת הדואר נפתחה. הטיוטה נשמרה בהגדרות עד שתשלחו את הדיווח או תשליכו אותה במפורש.": "The email application opened. The draft remains in Settings until you send the report or explicitly discard it.",
16271624
"שגיאה בהעתקה ללוח": "Could not copy to the clipboard",
1628-
"לא ניתן לפתוח את אפליקציית הטלפון": "Could not open the phone application",
1629-
"שגיאה בפתיחת אפליקציית הטלפון": "Error opening the phone application",
16301625
"ספריא": "Sefaria",
16311626
"גזור": "Cut",
16321627
"העתק": "Copy",

0 commit comments

Comments
 (0)