Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions store-assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
# Popup captures: regenerated by tools/capture.mjs.
raw-ui/
103 changes: 103 additions & 0 deletions store-assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Store screenshots

Chrome Web Store screenshots for Search automatic rewards, in English and six
translations. All are 1280×800, 24-bit RGB PNGs with no alpha, ready to upload:

- `chrome/<locale>/screenshot-1-main.png`: the popup as it opens.
- `chrome/<locale>/screenshot-2-progress.png`: a run in progress (3/5).
- `chrome/<locale>/screenshot-3-settings.png`: the search settings.

Locales: en, zh_CN, zh_TW, pt_BR, es, es_419 (a copy of es), fr, vi. In the Chrome Web
Store dashboard each language of the listing can have its own screenshots; a user
browsing in that language sees those first, then the global ones (upload `en` there).

Each image is the real popup, captured from the built extension with Chrome itself
running in that language, in a plain browser window on a flat background, with one
headline, one line and callouts. The style follows Free Game Claimer's store images.

## Trademark rules

Search automatic rewards works with Microsoft Rewards, but Microsoft's marks stay out
of the store images:

- No Microsoft or Bing logo, wordmark or domain anywhere in the image: not in the
browser frame, the captions, the callouts or any picture.
- The browser frame shows a neutral new tab: the tab is titled "New Tab" (Chrome's own
wording in each language) and the address bar is empty, with a search icon. Never
bing.com, rewards.bing.com or another Microsoft site.
- Text inside the popup UI, such as "Rewards" in a label or button, is fine.

`tools/render.mjs` fails if the captions, tab title or address bar name Microsoft or
Bing, and `tools/capture.mjs` fails if the popup shows an image other than its own
coin logo and Free Game Claimer's icon (`ALLOWED_IMAGES`): check any new image for
Microsoft or Bing marks before adding it there.

## Files

- `source/screenshot-*.html`: the three images, with the English captions.
- `source/i18n/locales.json`: the locales, the Chrome UI language each is captured in
(`tag`), the new-tab title (`newTab`) and the locales copied from another one
(`copies`: es_419 from es).
- `source/i18n/<locale>.json`: the captions per page (`h` headline, `s` subline,
`c` the callouts in the page's order).
- `source/layout.js` and `source/store.css`: the browser window, popup placement,
callout lines and look. A headline or subline that would wrap shrinks in 0.5 px
steps until it fits one line (not below 36 px and 17 px); a callout label that would
leave the image or overlap the popup or another label fails the render.
- `source/fonts/`: Mona Sans (SIL Open Font License, `OFL.txt`), with its latin-ext and
vietnamese subsets. Chinese captions fall back to PingFang SC/TC (Noto Sans SC/TC or
Microsoft YaHei/JhengHei elsewhere).
- `tools/views.mjs`: the popup states (storage for each) and the elements the callouts
point at. `tools/capture.mjs` captures them, `tools/render.mjs` lays out the images
and `tools/finalize.py` saves them without alpha.

## Regenerating

You need Node 20.11 or later, Python 3 with Pillow (`pip install pillow`) and, once,
Playwright's Chromium. From `store-assets/`:

```bash
npm ci
npx playwright install chromium
```

The translated popup needs a build with `_locales`: the i18n branch, PR #51
(`feat/i18n`), isn't merged into `master` yet. Build it in its own worktree and point
the capture at it with `--dist` (or `STORE_DIST`):

```bash
git fetch origin
git worktree add ../msr-i18n origin/feat/i18n # from the repository root
(cd ../msr-i18n/wxt && npm ci && npm run build)
```

Then, from `store-assets/`, one locale:

```bash
node tools/capture.mjs --locale fr --dist ../../msr-i18n/wxt/dist/chrome-mv3 # -> raw-ui/chrome/fr/
node tools/render.mjs --locale fr # -> chrome/fr/
```

All of them (`--locale es` also refreshes `chrome/es_419/`):

```bash
for l in en zh_CN zh_TW pt_BR es fr vi; do
node tools/capture.mjs --locale $l --dist ../../msr-i18n/wxt/dist/chrome-mv3
done
node tools/render.mjs --locale all
```

Once PR #51 is merged, build `wxt/` (`npm ci && npm run build` there) and leave out
`--dist`: it defaults to `../wxt/dist/chrome-mv3`. Without `--locale` both tools use
`en`.

How the language is set: on macOS Chrome ignores `--lang` and takes its UI language
from the system, so `tools/chrome-applelanguages.sh` starts it with the argument
`-AppleLanguages "(<tag>)"`, which overrides it for that one run. On Linux and Windows
the capture passes `--lang=<tag>` (and `LANGUAGE` on Linux); only the macOS route has
been run so far. Either way the capture stops if `chrome.i18n.getUILanguage()` reports
another language, so a translated popup is never shown in an English browser.

The committed images were made with Chrome for Testing 157; Playwright's bundled
Chromium can shift anti-aliasing slightly. To add a language, add it to `locales.json`
with its Chrome tag and new-tab title, write `<locale>.json`, then capture and render it.
Binary file added store-assets/chrome/en/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/en/screenshot-2-progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/en/screenshot-3-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/es/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/es/screenshot-2-progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/es/screenshot-3-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/es_419/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/fr/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/fr/screenshot-2-progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/fr/screenshot-3-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/pt_BR/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/vi/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/vi/screenshot-2-progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/vi/screenshot-3-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/zh_CN/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added store-assets/chrome/zh_TW/screenshot-1-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions store-assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions store-assets/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "search-automatic-rewards-store-assets",
"private": true,
"description": "Builds the Chrome Web Store screenshots in store-assets/ (see README.md).",
"type": "module",
"scripts": {
"capture": "node tools/capture.mjs",
"render": "node tools/render.mjs"
},
"devDependencies": {
"playwright": "1.64.1"
}
}
Binary file not shown.
Binary file added store-assets/source/fonts/MonaSans-latin.woff2
Binary file not shown.
Binary file not shown.
93 changes: 93 additions & 0 deletions store-assets/source/fonts/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2022 The Mona Sans Project Authors (https://github.com/github/mona-sans), with Reserved Font Name "Mona"

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
26 changes: 26 additions & 0 deletions store-assets/source/i18n/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"screenshot-1-main": {
"h": "Tus búsquedas diarias, hechas para ti",
"s": "Hace tus búsquedas diarias al abrir el navegador, o con un clic.",
"c": [
"Empieza con un clic",
"Activa o desactiva cada tarea"
]
},
"screenshot-2-progress": {
"h": "Sigue el progreso de cada ronda",
"s": "Las búsquedas se abren de una en una y se cierran al cargar.",
"c": [
"Progreso de la ronda",
"Detenlo cuando quieras"
]
},
"screenshot-3-settings": {
"h": "A tu manera",
"s": "Elige cuántas búsquedas hacer, el intervalo entre ellas y cuánto tiempo queda abierta cada pestaña.",
"c": [
"Número de búsquedas",
"Pausa entre búsquedas"
]
}
}
26 changes: 26 additions & 0 deletions store-assets/source/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"screenshot-1-main": {
"h": "Vos recherches quotidiennes, faites pour vous",
"s": "Lance vos recherches quotidiennes à l'ouverture du navigateur, ou en un clic.",
"c": [
"Lancez en un clic",
"Activez ou désactivez chaque tâche"
]
},
"screenshot-2-progress": {
"h": "Suivez chaque série",
"s": "Les recherches s'ouvrent une par une et se ferment une fois chargées.",
"c": [
"Progression de la série",
"Arrêtez à tout moment"
]
},
"screenshot-3-settings": {
"h": "Comme vous voulez",
"s": "Choisissez le nombre de recherches, l'intervalle entre elles et la durée d'ouverture de chaque onglet.",
"c": [
"Nombre de recherches",
"Pause entre les recherches"
]
}
}
36 changes: 36 additions & 0 deletions store-assets/source/i18n/locales.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"_note": "Store screenshots per language. tag: the Chrome UI language the popup is captured in. newTab: Chrome's own title for a new tab in that language (the browser frame shows a neutral new tab). copies: locales whose images are copied from another one. Captions are in <locale>.json, keyed by the page in source/ (h = headline, s = subline, c = callouts in the page's order); English is in the HTML.",
"locales": {
"en": {
"tag": "en-US",
"newTab": "New Tab"
},
"zh_CN": {
"tag": "zh-CN",
"newTab": "新标签页"
},
"zh_TW": {
"tag": "zh-TW",
"newTab": "新分頁"
},
"pt_BR": {
"tag": "pt-BR",
"newTab": "Nova guia"
},
"es": {
"tag": "es",
"newTab": "Nueva pestaña"
},
"fr": {
"tag": "fr",
"newTab": "Nouvel onglet"
},
"vi": {
"tag": "vi",
"newTab": "Thẻ mới"
}
},
"copies": {
"es_419": "es"
}
}
26 changes: 26 additions & 0 deletions store-assets/source/i18n/pt_BR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"screenshot-1-main": {
"h": "Suas pesquisas diárias, feitas para você",
"s": "Faz suas pesquisas diárias ao abrir o navegador, ou com um clique.",
"c": [
"Comece com um clique",
"Ligue ou desligue cada tarefa"
]
},
"screenshot-2-progress": {
"h": "Acompanhe cada rodada",
"s": "As pesquisas abrem uma aba por vez e fecham depois de carregar.",
"c": [
"Progresso da rodada",
"Pare quando quiser"
]
},
"screenshot-3-settings": {
"h": "Do seu jeito",
"s": "Escolha quantas pesquisas fazer, o intervalo entre elas e quanto tempo cada aba fica aberta.",
"c": [
"Número de pesquisas",
"Intervalo entre pesquisas"
]
}
}
Loading
Loading