Skip to content

feat: Add wallpaper download option and photographer source attribution#221

Open
mian196 wants to merge 11 commits into
prem-k-r:mainfrom
mian196:feature/download-wallpaper-final
Open

feat: Add wallpaper download option and photographer source attribution#221
mian196 wants to merge 11 commits into
prem-k-r:mainfrom
mian196:feature/download-wallpaper-final

Conversation

@mian196

@mian196 mian196 commented Jun 2, 2026

Copy link
Copy Markdown

📌 Description

This PR introduces a premium Wallpaper Download Option and a floating Unsplash Photographer Attribution Pill for random backgrounds.

🌟 Key Changes

  • High-Res Direct Download: Bypasses CDN compression to pull original high-resolution files from Unsplash.
  • Glassmorphic Attribution Overlay: Adds a floating pill in the bottom-right corner linking to the active photographer.
  • Strict Visual & State Controls:
    • Restricts downloads to random backgrounds; grays out (opacity: 0.4, cursor: not-allowed) and disables the download button on solid colors/uploads.
    • Custom hover/active overrides are added to prevent visual shifts when disabled.
    • Standardized symmetric Material download icon implemented.
  • Bot-Suggested Security & a11y Improvements:
    • Implemented Unsplash host verification checks on incoming Picsum URLs.
    • Added rel="noopener noreferrer" protection to external links and temporary programmatically triggered downloads.
    • Added full aria-label and aria-disabled tracking for screen readers.
  • Translation Strategy:
    • Added placeholder keys ("") in all 31 non-English locales for structural safety.
    • Added complete custom Urdu (ur.js) translations for all new wallpaper features.

🎨 Visual Changes (Screenshots / Videos)

output_10mb.mp4

✅ Checklist

  • I have read and followed the Contributing Guidelines.
  • My code follows the project's coding style and conventions.
  • I have tested my changes thoroughly to ensure expected behavior.
  • I have verified compatibility across Chrome and Firefox (additional browsers if applicable).
  • I have attached relevant visual evidence (screenshots/videos) if applicable.
  • I have updated the CHANGELOG.md under the appropriate categories with all my changes in this PR.

🤖 AI Assistance (Coding)

  • None
  • Ideas / planning
  • Debugging / review help
  • Small code snippets
  • Partial implementation
  • Major implementation help
  • Mostly AI-generated
  • Full vibe coded

Summary

This PR adds a wallpaper download feature for Unsplash-backed random backgrounds and introduces a photographer attribution pill to credit the image source.

Key Changes

Core Wallpaper Download Functionality

  • Added downloadWallpaper() function that retrieves original, uncompressed Unsplash images by resolving Picsum metadata and validating Unsplash URLs
  • Downloads are restricted to random wallpapers; a confirmation alert blocks download attempts for solid colors and uploaded images
  • Wallpaper metadata (photographer attribution and Unsplash source URL) is now captured from Picsum's /info endpoint and persisted in IndexedDB as imageInfo
  • New Unsplash URL validation helper (isValidUnsplashUrl) ensures security by verifying photographer attribution links

State Management & Background Type Tracking

  • Updated setBackground() to accept an optional background type parameter ("random", "upload", or "color")
  • Introduced updateBackgroundType() to replace the removed toggleBackgroundType()
  • Background type is persisted as a data-bg-type attribute on the body element to control UI state
  • Enhanced loadImageAndDetails() to return photographer metadata alongside images and images/metadata are properly restored on page reload

UI Components

  • Added download button in the wallpaper section (index.html) with SVG icon
  • Introduced floating attribution pill (#wallpaperSource) in the bottom-right displaying photographer name and linking to their Unsplash profile
  • Download button is visually disabled (opacity: 0.4, cursor: not-allowed) for solid colors and uploaded images through CSS rules
  • Custom hover/active overrides prevent visual shifts when the download button is disabled

Localization

  • Added English locale strings for download action, random wallpaper label, clear wallpaper action, and download restriction message
  • Included complete Urdu (ur.js) translation for all new wallpaper features
  • Updated scripts/languages.js to apply tooltips and aria-labels to the download button, random image trigger, and clear image buttons
  • Cleaned up trailing commas in non-English/non-Urdu locale files and empty placeholder keys

Styling

  • Updated button theming to group random and download buttons with the same hover/active styling as the upload button
  • Extended black theme overrides to include download button styling
  • Added wallpaper source attribution pill styling with glassmorphic appearance and base/hover/link states
  • Hide attribution pill when using solid color backgrounds
  • Download button styling includes disabled states with appropriate theme overrides

Technical Details

  • External links and programmatic downloads use rel="noopener noreferrer" for security
  • Wallpaper metadata persistence uses IndexedDB with optional infoData parameter; metadata is cleared when not provided
  • Upload handler now explicitly sets background type to "upload" and clears attribution UI
  • Random wallpaper flow captures redirect target URL, fetches metadata, and updates attribution UI with validated Unsplash information
  • CHANGELOG.md updated with feature documentation

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79790a9b-0cc9-44c4-8e85-84b9a40f7c54

📥 Commits

Reviewing files that changed from the base of the PR and between 37ed7f8 and 89e3dcd.

📒 Files selected for processing (10)
  • locales/az.js
  • locales/cs.js
  • locales/es.js
  • locales/it.js
  • locales/pt.js
  • locales/sl.js
  • locales/ta.js
  • locales/tr.js
  • locales/vi.js
  • locales/zh_TW.js
💤 Files with no reviewable changes (10)
  • locales/az.js
  • locales/tr.js
  • locales/pt.js
  • locales/it.js
  • locales/vi.js
  • locales/sl.js
  • locales/ta.js
  • locales/es.js
  • locales/zh_TW.js
  • locales/cs.js

📝 Walkthrough

Walkthrough

This PR adds wallpaper download functionality with Unsplash attribution. A new Download button appears in the wallpaper controls; it downloads only from random Picsum wallpapers and links to Unsplash photos via a new attribution pill. The implementation persists photo metadata in IndexedDB, refactors the background-type state machine, and includes localization and styling for the new UI elements.

Changes

Wallpaper Download with Unsplash Attribution

Layer / File(s) Summary
Documentation and UI markup
CHANGELOG.md, index.html
Added three new feature entries to the changelog; inserted hidden Download button with SVG icon and wallpaper attribution container (prefix span + link) in the HTML.
Locale strings, language wiring, and locale formatting
locales/en.js, locales/ur.js, scripts/languages.js, locales/*.js
English and Urdu translation strings for download, random, and clear wallpaper actions; wired title and aria-label attributes for new controls in applyLanguage with English fallbacks; applied trailing-comma formatting fixes across all locale files.
IndexedDB metadata storage and background-type state
scripts/wallpaper.js
setBackground now accepts optional bgType parameter; saveImageToIndexedDB conditionally persists imageInfo metadata; loadImageAndDetails expands return tuple to include saved metadata; clearImageFromIndexedDB removes metadata entries.
Wallpaper application and attribution flows
scripts/wallpaper.js
Upload handler calls setBackground(..., "upload") and clears attribution; random wallpaper flow extracts Picsum redirect URL, fetches metadata, saves both image and metadata, and updates attribution UI; clear wallpaper flow resets background-type and attribution.
Download wallpaper implementation
scripts/wallpaper.js
downloadWallpaper function blocks downloads unless wallpaper type is "random", derives file extension from blob MIME type, and downloads either via direct Unsplash URL or blob object URL with fallback filename.
Button and attribution pill styling
style.css
Grouped download button with upload/random button for consistent hover/active behavior; introduced wallpaper source attribution pill with base, hover, and link styles; added disabled-state styling for download button in non-random modes; black-theme overrides for all new controls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • prem-k-r/MaterialYouNewTab#209: Modifies scripts/wallpaper.js background-setting flow and blob/object URL handling that overlaps with this PR's setBackground refactor.

Suggested labels

enhancement, i18n/l10n, ui/ux

Suggested reviewers

  • prem-k-r
  • itz-rj-here
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly summarizes the two main features introduced: wallpaper download functionality and photographer source attribution for random wallpapers.
Description check ✅ Passed The description comprehensively covers all required template sections: detailed feature description, visual evidence (video link), related issues reference, and a completed checklist confirming guidelines, testing, compatibility, and changelog updates.
Docstring Coverage ✅ Passed Docstring coverage is 91.67% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🧹 Nitpick comments (3)
scripts/wallpaper.js (1)

131-141: ⚡ Quick win

Add response status check before parsing JSON.

If the Picsum info endpoint returns a non-2xx response (e.g., 404), calling .json() may fail or return unexpected content. While the outer try-catch catches exceptions, checking infoResponse.ok provides clearer error handling.

Suggested improvement
             if (match) {
                 const photoId = match[1];
                 const infoResponse = await fetch(`https://picsum.photos/id/${photoId}/info`);
-                infoData = await infoResponse.json();
+                if (infoResponse.ok) {
+                    infoData = await infoResponse.json();
+                }
             }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/wallpaper.js` around lines 131 - 141, The fetch of Picsum metadata
should check the HTTP status before calling .json(): after creating infoResponse
(in the block that extracts redirectedUrl, match, and photoId inside the try),
test infoResponse.ok (or check status) and handle non-2xx responses by logging
or throwing a descriptive error instead of directly calling infoResponse.json();
then only assign infoData from infoResponse.json() when ok. Update the logic
around redirectedUrl/match/photoId/infoResponse/infoData to include this status
guard and clear error handling for 404s or other non-success responses.
scripts/languages.js (1)

343-355: ⚡ Quick win

Keep the wallpaper buttons' accessible names in sync with the localized tooltips.

Line 347 and Line 354 only update title. If these remain icon-only controls, screen readers can keep a stale or missing name while the visual tooltip is localized. Mirror the aria-label update used for #downloadWallpaper here too.

Suggested patch
     const randomBtn = document.getElementById("randomImageTrigger");
     if (randomBtn) {
         const hoverText = translations[lang]?.randomWallpaperText || translations["en"].randomWallpaperText;
         randomBtn.setAttribute("title", hoverText);
+        randomBtn.setAttribute("aria-label", hoverText);
     }
 
     // Update title/tooltip for `#clearImage`
     const clearBtn = document.getElementById("clearImage");
     if (clearBtn) {
         const hoverText = translations[lang]?.clearWallpaperText || translations["en"].clearWallpaperText;
         clearBtn.setAttribute("title", hoverText);
+        clearBtn.setAttribute("aria-label", hoverText);
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/languages.js` around lines 343 - 355, The code updates only the title
attribute for the wallpaper buttons (`#randomImageTrigger` and `#clearImage`), but
their accessible names (aria-label) must also be kept in sync so screen readers
reflect localization; update both elements in the same blocks where hoverText is
computed to also setAttribute("aria-label", hoverText) (mirror the behavior used
for `#downloadWallpaper`) so both title and aria-label use
translations[lang]?.randomWallpaperText / clearWallpaperText with fallback to
translations["en"].
style.css (1)

5773-5775: ⚡ Quick win

Hide the attribution pill for every non-random wallpaper mode.

Line 5774 only hides #wallpaperSource for data-bg="color", but scripts/wallpaper.js already publishes the exact data-bg-type state and this pill is only valid for random Unsplash wallpapers. Using the broader data-bg check leaves upload mode dependent on JS clearing the pill on every path.

Suggested patch
-/* Hide when color mode is active */
-body[data-bg="color"] `#wallpaperSource` {
+/* Hide unless the active wallpaper came from the random flow */
+body:not([data-bg-type="random"]) `#wallpaperSource` {
 	display: none !important;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@style.css` around lines 5773 - 5775, The current rule hides `#wallpaperSource`
only for body[data-bg="color"], which is fragile; instead use the published
data-bg-type state from scripts/wallpaper.js and make the pill visible only for
Unsplash random mode. Replace the data-bg-based logic with rules that default
`#wallpaperSource` to hidden and explicitly reveal it only when
body[data-bg-type="unsplash-random"] so upload/other modes don't rely on JS to
clear the pill.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CHANGELOG.md`:
- Line 23: Update the CHANGELOG entry text to accurately state the download
source and behavior: replace the phrase 'uncompressed from Unsplash CDN' with
wording that clarifies the feature downloads the original Unsplash image after
resolving the image's source/metadata (for example: "downloads the original
Unsplash image after resolving source metadata"), and ensure the sentence about
the "Download Wallpaper" button mentions it saves the original/high-resolution
Unsplash image rather than implying direct uncompressed CDN delivery.

In `@locales/ar_SA.js`:
- Around line 219-220: The localization key downloadOnlyRandomWallpaper must use
a placeholder token instead of an English substring; update the Arabic (and
other) translations for downloadOnlyRandomWallpaper to include a token like
"{randomWallpaper}" (not the English phrase), then change the replacement logic
in scripts/wallpaper.js (where baseAlertMsg.replace("a random wallpaper",
randomText) is used) to replace the "{randomWallpaper}" token with randomText
(e.g., baseAlertMsg.replace("{randomWallpaper}", randomText)), so the
substitution works regardless of language.

In `@locales/en.js`:
- Around line 175-177: The locale string currently embeds the English phrase "a
random wallpaper" which breaks when translated; update the locale entries (e.g.,
the base alert string(s) such as the one referenced by
downloadOnlyRandomWallpaper and any similar keys around lines 213–215 and
262–269) to use a token like {wallpaperType} instead of the hard-coded English
substring, then change the code in scripts/wallpaper.js (where baseAlertMsg is
composed) to perform a token substitution (e.g.,
baseAlertMsg.replace("{wallpaperType}", randomText)) so localized grammar stays
intact; apply the same token approach for the other affected compositions
mentioned in the comment.

In `@locales/sv.js`:
- Around line 164-166: The Swedish locale file defines UI keys
("downloadWallpaperText", "randomWallpaperText", "clearWallpaperText" and the
other two at the bottom) as empty strings which causes unlabeled controls;
update locales/sv.js by replacing the empty values with proper Swedish
translations for those keys (or remove those key entries so the i18n fallback to
English is used) — locate the keys "downloadWallpaperText",
"randomWallpaperText", "clearWallpaperText" (and the two additional empty
entries around the later block) and either supply Swedish text or delete the
entries to allow fallback.

In `@locales/ta.js`:
- Around line 157-159: The three Tamil localization keys downloadWallpaperText,
randomWallpaperText, and clearWallpaperText must not be set to empty strings;
either provide proper Tamil translations for these values or remove these keys
so the English fallback is used; update the same pattern for the other
occurrence (the keys at the later block referenced) to ensure the wallpaper
button labels, accessibility text, and attribution/dialog copy are available to
Tamil users instead of blank strings.

In `@locales/th.js`:
- Around line 156-158: These three localization entries
("downloadWallpaperText", "randomWallpaperText", "clearWallpaperText") in
locales/th.js are empty strings causing blank labels and ARIA/title text; either
supply proper Thai translations for each key used by the download/random/clear
controls and wallpaper attribution/dialog UI, or remove these keys so the
fallback locale is used; repeat the same fix for the other empty trio at lines
mentioned (the duplicate keys around 190-192) to ensure no blank UI text
remains.

In `@locales/tr.js`:
- Around line 128-130: The three i18n keys downloadWallpaperText,
randomWallpaperText, and clearWallpaperText in locales/tr.js were set to empty
strings, removing visible/help text and screen reader labels; restore proper
Turkish translations for these keys (and the same set at the second occurrence
around lines 139-141) or remove those empty entries so the default/fallback
translations are used instead; locate the entries by the exact key names
downloadWallpaperText, randomWallpaperText, clearWallpaperText and replace the
empty values with concise Turkish strings matching the intent of the original
English text.

In `@locales/uk.js`:
- Around line 167-169: The three Ukrainian locale keys "downloadWallpaperText",
"randomWallpaperText", and "clearWallpaperText" must not be empty strings;
either provide proper Ukrainian translations for these button/ARIA/attribution
labels or remove these keys so the English fallback is used; update both
occurrences (the block with those keys and the similar keys at the later
occurrence) to contain valid Ukrainian text or be omitted to preserve fallback.

In `@locales/ur.js`:
- Line 119: The Urdu localization key "photoBy" currently uses the incorrect
phrase "تصویر بہ مہر"; update the string value for the "photoBy" key to a proper
byline phrase such as "تصویر از" (or another native attribution equivalent) so
that "photoBy" reflects a correct attribution wording in locales/ur.js.

In `@locales/uz.js`:
- Around line 167-169: The three Uzbek wallpaper localization keys
downloadWallpaperText, randomWallpaperText, and clearWallpaperText are set to
empty strings, which overrides the fallback and leaves the UI unlabeled; either
provide Uzbek translations for these keys (e.g., appropriate short action labels
and accessible text) or remove these keys so the fallback locale is used
instead, and do the same for the duplicate empty entries later in the file (the
second set of downloadWallpaperText/randomWallpaperText/clearWallpaperText).

In `@locales/vi.js`:
- Around line 121-123: The three wallpaper localization keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" (and
the corresponding empty keys at lines 132-134) are empty and remove UI labels;
replace the empty string values with proper Vietnamese translations (e.g., brief
UI/button text and ARIA/title equivalents) for those keys, or remove the keys so
the code falls back to English—update the entries for the exact symbols
"downloadWallpaperText", "randomWallpaperText", "clearWallpaperText" (and the
duplicate keys at 132-134) in locales/vi.js accordingly.

In `@scripts/wallpaper.js`:
- Around line 266-269: The current logic building alertMsg uses a literal
English substring replacement which breaks non-English locales; update locale
entries (downloadOnlyRandomWallpaper) to include a placeholder like
{randomWallpaper} in every locale and change the code that computes alertMsg
(using variables translations, baseAlertMsg, randomText, alertMsg) to replace
that placeholder token with randomText (with a fallback to the English message
if the locale key is missing) instead of .replace("a random wallpaper", ...),
then pass the resulting alertMsg to alertPrompt.
- Around line 285-288: The if-branch checking imageType === "upload" and using
blob.name is dead/unreachable and should be removed: delete the block that sets
fileName = blob.name (references to imageType, blob, fileName) because imageType
is guaranteed "random" at this point and IndexedDB-stored Blobs do not preserve
a name property; if you actually need to retain original filenames instead,
modify the upload/save flow to store filename metadata alongside the Blob and
read that metadata where filenames are required (do not rely on blob.name).

---

Nitpick comments:
In `@scripts/languages.js`:
- Around line 343-355: The code updates only the title attribute for the
wallpaper buttons (`#randomImageTrigger` and `#clearImage`), but their accessible
names (aria-label) must also be kept in sync so screen readers reflect
localization; update both elements in the same blocks where hoverText is
computed to also setAttribute("aria-label", hoverText) (mirror the behavior used
for `#downloadWallpaper`) so both title and aria-label use
translations[lang]?.randomWallpaperText / clearWallpaperText with fallback to
translations["en"].

In `@scripts/wallpaper.js`:
- Around line 131-141: The fetch of Picsum metadata should check the HTTP status
before calling .json(): after creating infoResponse (in the block that extracts
redirectedUrl, match, and photoId inside the try), test infoResponse.ok (or
check status) and handle non-2xx responses by logging or throwing a descriptive
error instead of directly calling infoResponse.json(); then only assign infoData
from infoResponse.json() when ok. Update the logic around
redirectedUrl/match/photoId/infoResponse/infoData to include this status guard
and clear error handling for 404s or other non-success responses.

In `@style.css`:
- Around line 5773-5775: The current rule hides `#wallpaperSource` only for
body[data-bg="color"], which is fragile; instead use the published data-bg-type
state from scripts/wallpaper.js and make the pill visible only for Unsplash
random mode. Replace the data-bg-based logic with rules that default
`#wallpaperSource` to hidden and explicitly reveal it only when
body[data-bg-type="unsplash-random"] so upload/other modes don't rely on JS to
clear the pill.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 511b82b9-6e8a-488c-bc9f-bdad43eb5614

📥 Commits

Reviewing files that changed from the base of the PR and between 2fb7f5e and 6c601a5.

📒 Files selected for processing (37)
  • CHANGELOG.md
  • index.html
  • locales/ar_SA.js
  • locales/az.js
  • locales/bn.js
  • locales/cs.js
  • locales/de.js
  • locales/el.js
  • locales/en.js
  • locales/es.js
  • locales/fa.js
  • locales/fr.js
  • locales/hi.js
  • locales/hu.js
  • locales/idn.js
  • locales/it.js
  • locales/ja.js
  • locales/ko.js
  • locales/mr.js
  • locales/ne.js
  • locales/pl.js
  • locales/pt.js
  • locales/ru.js
  • locales/sl.js
  • locales/sv.js
  • locales/ta.js
  • locales/th.js
  • locales/tr.js
  • locales/uk.js
  • locales/ur.js
  • locales/uz.js
  • locales/vi.js
  • locales/zh.js
  • locales/zh_TW.js
  • scripts/languages.js
  • scripts/wallpaper.js
  • style.css

Comment thread CHANGELOG.md Outdated
Comment thread locales/ar_SA.js Outdated
Comment thread locales/en.js
Comment thread locales/sv.js Outdated
Comment thread locales/ta.js Outdated
Comment thread locales/ur.js Outdated
Comment thread locales/uz.js Outdated
Comment thread locales/vi.js Outdated
Comment thread scripts/wallpaper.js
Comment thread scripts/wallpaper.js Outdated
mian196 added 4 commits June 2, 2026 12:24
Replace misleading 'uncompressed from Unsplash CDN' phrasing with accurate
description: feature downloads the original high-resolution Unsplash image
after resolving the wallpaper's source metadata.
Replace the English substring match 'a random wallpaper' with a
language-agnostic placeholder token {randomWallpaper}. The old approach
broke as soon as any locale provided a real translation, since the
English substring would no longer be present to match.

- locales/en.js: token added to base string
- locales/ur.js: Urdu translation updated to use token
- scripts/wallpaper.js: .replace() targets token instead of English text
Update 'photoBy' from 'تصویر بہ مہر' to 'تصویر از' for more
natural Urdu phrasing of the photographer attribution prefix.
imageType is guaranteed 'random' past the early-return guard on line 265,
so the 'imageType === upload' branch was unreachable. Additionally,
IndexedDB stores Blobs, not Files, so blob.name is always undefined.

- Remove dead if/else-if block and let fileName declaration
- Simplify to a direct if check on infoData/isValidUnsplashUrl
- Convert fileName to const since it is now always date-derived

@prem-k-r prem-k-r left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking of updating the UI of the wallpaper option section. Seems like it's a good time now 🙂
Also I have plan to add option to choose source: Bing wallpaper or Lorem Picsum, choosing wallpaper quality, etc

Comment thread locales/ar_SA.js Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
locales/sl.js (1)

119-121: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Per the maintainer's instruction and PR removal commit objective, delete these three Slovenian entries. The i18n fallback will correctly use English when these keys are absent.

🔧 Proposed fix
 "uploadWallpaperText": "Naloži ozadje",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "backupText": "Varnostna kopija",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/sl.js` around lines 119 - 121, Remove the three empty Slovenian i18n
keys "downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText"
from locales/sl.js; locate these exact keys in the file and delete the key-value
lines so the fallback to English is used instead.
locales/az.js (1)

119-121: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Per the maintainer's request and the PR's stated objective to remove empty placeholder keys from non-en/ur locales, these three entries should be deleted entirely rather than left as empty strings. When these keys are absent, applyLanguage in scripts/languages.js will correctly fall back to English via the || operator.

🔧 Proposed fix
 "uploadWallpaperText": "Divar kağızı yükləyin",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "backupText": "Yedək",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/az.js` around lines 119 - 121, Remove the three empty placeholder
localization entries "downloadWallpaperText", "randomWallpaperText", and
"clearWallpaperText" from the az locale object (they currently have empty string
values); locate them in locales/az.js and delete those key/value pairs entirely
so applyLanguage in scripts/languages.js can fall back to English via the
existing || operator.
locales/cs.js (1)

176-178: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Following the maintainer's instruction and PR objective, delete these three entries entirely from the Czech locale. The English fallback will apply automatically when the keys are missing.

🔧 Proposed fix
 "uploadWallpaperText": "Nahrát tapetu",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "rangColor": "Vybrat barvu",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/cs.js` around lines 176 - 178, Remove the three empty placeholder
translation keys "downloadWallpaperText", "randomWallpaperText", and
"clearWallpaperText" from the Czech locale file (delete those entries entirely);
do not replace them with empty strings so the English fallback will apply
automatically, and ensure no trailing commas or formatting issues remain after
removal.
locales/it.js (1)

150-152: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Per the maintainer's guidance and the PR's removal objective, delete these three Italian locale entries. The fallback to English will work correctly when these keys are absent.

🔧 Proposed fix
 "uploadWallpaperText": "Carica immagine",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "backupText": "Backup",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/it.js` around lines 150 - 152, Remove the three empty Italian locale
keys "downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText"
from the locale object so the build falls back to English; delete those
key/value lines and adjust surrounding commas to keep the JS object syntax valid
(no dangling commas or missing separators).
locales/pt.js (1)

157-159: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Consistent with the maintainer's request and the stated PR goal, remove these three Portuguese entries entirely. English fallback will apply when the keys are omitted.

🔧 Proposed fix
 "uploadWallpaperText": "Enviar Papel de Parede",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "rangColor": "Escolher cor",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/pt.js` around lines 157 - 159, Remove the three empty placeholder
keys "downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText"
from the Portuguese locale object so English fallback is used; update the
enclosing object so commas and trailing syntax remain valid after deletion and
run a quick lint/parse to confirm locales/pt.js still exports a well-formed
object.
♻️ Duplicate comments (3)
locales/ta.js (1)

157-159: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Following the maintainer's guidance and PR objective, delete these three Tamil entries. The English fallback mechanism will apply when the keys are missing.

🔧 Proposed fix
 "uploadWallpaperText": "பின்படத்தை பதிவேற்று",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "rangColor": "நிறம் எடு",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/ta.js` around lines 157 - 159, Remove the three empty Tamil
localization keys "downloadWallpaperText", "randomWallpaperText", and
"clearWallpaperText" from the locales/ta.js file so the English fallback is
used; locate the object containing these keys (the Tamil export/locale object)
and delete those key-value pairs entirely rather than leaving empty strings.
locales/tr.js (1)

128-130: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

Per the maintainer's request and PR removal commit goal, delete these three Turkish entries. English fallback will correctly apply when these keys are absent.

🔧 Proposed fix
 "uploadWallpaperText": "Duvar Kağıdı Yükle",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "backupText": "Yedekleme",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/tr.js` around lines 128 - 130, Remove the three empty Turkish
localization keys "downloadWallpaperText", "randomWallpaperText", and
"clearWallpaperText" from the locales object in tr.js so the English fallback is
used; ensure you delete the entire key-value lines and verify the surrounding
object still has valid JSON/JS object syntax (commas adjusted) after removal.
locales/sv.js (1)

164-166: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove these empty placeholder keys.

The maintainer explicitly requested on this file: "please don't put the entry in the file for other languages." Delete these three Swedish entries entirely so the English fallback applies.

🔧 Proposed fix
 "uploadWallpaperText": "Ladda upp bakgrund",
-"downloadWallpaperText": "",
-"randomWallpaperText": "",
-"clearWallpaperText": "",
 "rangColor": "Välj färg",

Based on learnings: the maintainer explicitly requested "please don't put the entry in the file for other languages" and the PR description states "subsequent commit removed empty placeholder keys from non-en/ur locales."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@locales/sv.js` around lines 164 - 166, Delete the three empty Swedish
localization keys "downloadWallpaperText", "randomWallpaperText", and
"clearWallpaperText" from the sv.js locale object so they no longer appear in
the file; removing these placeholder entries will allow the English fallback to
be used as requested by the maintainer.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@locales/az.js`:
- Around line 119-121: Remove the three empty placeholder localization entries
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the az locale object (they currently have empty string values); locate them in
locales/az.js and delete those key/value pairs entirely so applyLanguage in
scripts/languages.js can fall back to English via the existing || operator.

In `@locales/cs.js`:
- Around line 176-178: Remove the three empty placeholder translation keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the Czech locale file (delete those entries entirely); do not replace them with
empty strings so the English fallback will apply automatically, and ensure no
trailing commas or formatting issues remain after removal.

In `@locales/it.js`:
- Around line 150-152: Remove the three empty Italian locale keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the locale object so the build falls back to English; delete those key/value
lines and adjust surrounding commas to keep the JS object syntax valid (no
dangling commas or missing separators).

In `@locales/pt.js`:
- Around line 157-159: Remove the three empty placeholder keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the Portuguese locale object so English fallback is used; update the enclosing
object so commas and trailing syntax remain valid after deletion and run a quick
lint/parse to confirm locales/pt.js still exports a well-formed object.

In `@locales/sl.js`:
- Around line 119-121: Remove the three empty Slovenian i18n keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
locales/sl.js; locate these exact keys in the file and delete the key-value
lines so the fallback to English is used instead.

---

Duplicate comments:
In `@locales/sv.js`:
- Around line 164-166: Delete the three empty Swedish localization keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the sv.js locale object so they no longer appear in the file; removing these
placeholder entries will allow the English fallback to be used as requested by
the maintainer.

In `@locales/ta.js`:
- Around line 157-159: Remove the three empty Tamil localization keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the locales/ta.js file so the English fallback is used; locate the object
containing these keys (the Tamil export/locale object) and delete those
key-value pairs entirely rather than leaving empty strings.

In `@locales/tr.js`:
- Around line 128-130: Remove the three empty Turkish localization keys
"downloadWallpaperText", "randomWallpaperText", and "clearWallpaperText" from
the locales object in tr.js so the English fallback is used; ensure you delete
the entire key-value lines and verify the surrounding object still has valid
JSON/JS object syntax (commas adjusted) after removal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0fdab932-86a9-4837-92e6-4bfd1777da1e

📥 Commits

Reviewing files that changed from the base of the PR and between a628357 and 37ed7f8.

📒 Files selected for processing (30)
  • locales/ar_SA.js
  • locales/az.js
  • locales/bn.js
  • locales/cs.js
  • locales/de.js
  • locales/el.js
  • locales/es.js
  • locales/fa.js
  • locales/fr.js
  • locales/hi.js
  • locales/hu.js
  • locales/idn.js
  • locales/it.js
  • locales/ja.js
  • locales/ko.js
  • locales/mr.js
  • locales/ne.js
  • locales/pl.js
  • locales/pt.js
  • locales/ru.js
  • locales/sl.js
  • locales/sv.js
  • locales/ta.js
  • locales/th.js
  • locales/tr.js
  • locales/uk.js
  • locales/uz.js
  • locales/vi.js
  • locales/zh.js
  • locales/zh_TW.js
💤 Files with no reviewable changes (19)
  • locales/fr.js
  • locales/zh.js
  • locales/th.js
  • locales/ne.js
  • locales/ja.js
  • locales/ko.js
  • locales/hu.js
  • locales/el.js
  • locales/de.js
  • locales/bn.js
  • locales/hi.js
  • locales/pl.js
  • locales/ar_SA.js
  • locales/mr.js
  • locales/fa.js
  • locales/ru.js
  • locales/idn.js
  • locales/uk.js
  • locales/uz.js
✅ Files skipped from review due to trivial changes (1)
  • locales/es.js

@mian196

mian196 commented Jun 3, 2026

Copy link
Copy Markdown
Author

I am thinking of updating the UI of the wallpaper option section. Seems like it's a good time now 🙂 Also I have plan to add option to choose source: Bing wallpaper or Lorem Picsum, choosing wallpaper quality, etc

Aren't both Bing Wallpaper and Lorem Picsum backed by Unsplash?
Automatically adjusting the active background quality based on screen size (higher quality for >1080p, lower for smaller screens) is a smart approach, though a manual quality setting would be great for user flexibility.

Just to clarify, this PR doesn't change how the background is rendered or set by the extension, it only ensures that when a user clicks download, they get the original, uncompressed quality.

@mian196 mian196 requested a review from prem-k-r June 3, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants