-
Notifications
You must be signed in to change notification settings - Fork 6
i18n: add Hebrew translation for plugin terms #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ClickAndGoScript
wants to merge
9
commits into
NodeBB:main
Choose a base branch
from
ClickAndGoScript:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9142c50
Add Hebrew translation
Y-PLONI 552619b
feat: עדכונים מינוריים להגדרות ותרגום web-push
ClickAndGoScript 98b9b72
chore: שינוי שם תיקיית הלוקליזציה מ-he-IL ל-he
ClickAndGoScript 510bebb
Merge branch 'main' of github.com-otzaria:ClickAndGoScript/nodebb-plu…
ClickAndGoScript d1d5e14
feat: הוספת טיפול בהרשאות התראות ושגיאות הרשמה לפוש נוטיפיקיישן
ClickAndGoScript d6d11d9
Merge branch 'NodeBB:main' into main
ClickAndGoScript 9f1b30f
feat: add browser support detection and service worker timeout handling
ClickAndGoScript 465fe50
feat: הוספת תמיכה ב-Service Worker לדפדני Safari ו-iOS
ClickAndGoScript b037aa9
feat: הוספת תמיכה במיזוג התראות באמצעות mergeId לתאימות עם Safari
ClickAndGoScript File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,3 +216,4 @@ pip-log.txt | |
|
|
||
| sftp-config.json | ||
| node_modules/ | ||
| nodebb-plugin-web-push-1.xml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "profile.label": "התראות דחיפה", | ||
| "profile.introduction": "בנוסף להתראות בתוך האפליקציה ולהתראות בדוא״ל, ניתן לבחור לקבל גם התראות דחיפה. כך תוכלו לקבל התראות גם כשהאפליקציה אינה פתוחה במכשיר.", | ||
| "profile.option": "הפעלת התראות דחיפה במכשיר זה", | ||
| "profile.devices": "כרגע נשלחות התראות ל־ <strong>%1</strong> מכשיר(ים).", | ||
| "profile.permissionBlocked": "המכשיר שלך אינו מאפשר כרגע לקבל התראות מאתר זה. יש לאשר את הרשאת ההתראות כדי להמשיך.", | ||
| "profile.send-test": "שליחת התראת בדיקה", | ||
|
|
||
| "toast.test_success": "התראת הבדיקה נשלחה.", | ||
| "toast.test_unavailable": "לא ניתן לשלוח התראת בדיקה כי התראות דחיפה אינן מופעלות במכשיר זה.", | ||
| "toast.permission_denied": "הרשאת ההתראות נדחתה. יש לאפשר התראות עבור אתר זה בהגדרות הדפדפן.", | ||
| "toast.subscribe_failed": "לא ניתן להפעיל התראות דחיפה במכשיר זה. נסו שוב.", | ||
| "toast.unsupported": "הדפדפן הזה אינו תומך בהתראות דחיפה.", | ||
| "toast.sw_not_registered": "התראות דחיפה אינן זמינות: שירות הרקע לא נרשם. באייפון, יש להתקין את האתר תחילה למסך הבית." | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,83 @@ | ||
| // this file here as placeholder in case needed. Add back to plugin.json to use | ||
|
|
||
| 'use strict'; | ||
|
|
||
| // NodeBB core skips serviceWorker.register() on Safari (see public/src/app.js). | ||
| // That predates iOS 16.4, where Safari/PWA does support Web Push. Without an SW, | ||
| // navigator.serviceWorker.ready hangs forever and our settings page silently fails. | ||
| // This script registers the SW ourselves on Safari/iOS, and logs every lifecycle | ||
| // event so failures surface in Web Inspector instead of disappearing. | ||
|
|
||
| (async () => { | ||
| const [hooks] = await app.require(['hooks']); | ||
|
|
||
| hooks.on('action:app.load', async () => { | ||
| // ... | ||
| if (!('serviceWorker' in navigator)) { | ||
| console.warn('[web-push] serviceWorker not supported'); | ||
| return; | ||
| } | ||
|
|
||
| const ua = navigator.userAgent; | ||
| const isSafari = /^((?!chrome|android).)*safari/i.test(ua); | ||
| const isIOS = /iPad|iPhone|iPod/.test(ua) || | ||
| (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); | ||
|
|
||
| if (!isSafari && !isIOS) { | ||
| // Core handles registration on non-Safari browsers. | ||
| return; | ||
| } | ||
|
|
||
| // Core already tried (and skipped) registration by this point. If something | ||
| // is registered, leave it alone. | ||
| const existing = await navigator.serviceWorker.getRegistration(); | ||
| if (existing) { | ||
| console.info('[web-push] SW already registered:', existing); | ||
| return; | ||
| } | ||
|
|
||
| const swUrl = (config.relative_path || '') + '/service-worker.js'; | ||
| const scope = (config.relative_path || '') + '/'; | ||
|
|
||
| console.info('[web-push] Registering service worker (Safari/iOS fallback):', { swUrl, scope }); | ||
|
|
||
| let registration; | ||
| try { | ||
| registration = await navigator.serviceWorker.register(swUrl, { scope }); | ||
| console.info('[web-push] register() resolved:', registration); | ||
| } catch (err) { | ||
| console.error('[web-push] register() FAILED:', err); | ||
| console.error('[web-push] Failure name:', err && err.name); | ||
| console.error('[web-push] Failure message:', err && err.message); | ||
| return; | ||
| } | ||
|
|
||
| const logState = (worker, label) => { | ||
| if (!worker) return; | ||
| console.info(`[web-push] ${label} initial state:`, worker.state); | ||
| worker.addEventListener('statechange', () => { | ||
| console.info(`[web-push] ${label} state →`, worker.state); | ||
| }); | ||
| worker.addEventListener('error', (e) => { | ||
| console.error(`[web-push] ${label} error event:`, e); | ||
| }); | ||
| }; | ||
|
|
||
| logState(registration.installing, 'installing'); | ||
| logState(registration.waiting, 'waiting'); | ||
| logState(registration.active, 'active'); | ||
|
|
||
| registration.addEventListener('updatefound', () => { | ||
| console.info('[web-push] updatefound — new worker installing'); | ||
| logState(registration.installing, 'installing(updatefound)'); | ||
| }); | ||
|
|
||
| navigator.serviceWorker.addEventListener('error', (e) => { | ||
| console.error('[web-push] navigator.serviceWorker error:', e); | ||
| }); | ||
|
|
||
| try { | ||
| const ready = await navigator.serviceWorker.ready; | ||
| console.info('[web-push] serviceWorker.ready resolved:', ready); | ||
| } catch (err) { | ||
| console.error('[web-push] serviceWorker.ready rejected:', err); | ||
| } | ||
| }); | ||
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this