Skip to content

Commit

Permalink
Merge branch 'main' into custom-theme-favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
prem-k-r authored Feb 3, 2025
2 parents f7ebb39 + 8499996 commit 560ead4
Show file tree
Hide file tree
Showing 31 changed files with 469 additions and 440 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,17 @@ Below are screenshots of the process to guide you through each step visually.

<img src="https://i.postimg.cc/bPW2fHX7/FireFox.png" alt="Screenshot" width="569">

**Or** follow the manual steps below:
2. **To Update the Homepage**:

2. **Manual Installation**:
- Open Firefox **Settings** and navigate to **Home**, or type `about:preferences#home` in the address bar.
- Under the **Homepage and new windows** section, select **Custom URLs...**.
- Paste the following URL:
```text
moz-extension://e31d6701-f699-414f-bb4c-8fde495c432e/index.html
```
- This will update both your homepage and new tab to the extension.

3. **Manual Installation (Temporary)**:

- Clone the repository or download and extract the ZIP file.
- **Prepare the Manifest**:
Expand Down Expand Up @@ -255,7 +263,7 @@ Contributions are welcome! If you’d like to contribute:
1. Follow the guidelines in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
2. Fork the repository.
3. Create a branch: `git checkout -b feature/YourFeature`.
3. Create a new branch: `git checkout -b feature/YourFeature`.
4. Commit your changes: `git commit -m 'Add Your Feature'`.
5. Push to the branch: `git push origin feature/YourFeature`.
6. Open a pull request.
Expand Down
12 changes: 6 additions & 6 deletions docs/Get_WeatherAPI_Key.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h2>Step 5: Copy Your API Key</h2>
<h2>Step 6: Paste Your API Key</h2>
<ol>
<li>Paste <b>your API key</b> into the WeatherAPI key field in the extension menu.</li>
<li>Press enter or click on Save button to integrate it.</li>
<li>Press enter or click on the Save button to integrate it.</li>
</ol>
<img src="https://i.ibb.co/CM3yrCG/image.png" alt="Paste API Key" border="0">
</section>
Expand Down Expand Up @@ -186,14 +186,14 @@ <h3>Why do I need an API key?</h3>
<h3>What are the benefits of using my own API key?</h3>
<p>Using your own unique API key provides several key advantages:</p>
<ul>
<li><strong>No Disruption:</strong> Using your own API key helps you avoid unexpected limits and ensures
there are no disruptions in service, keeping your access to weather data uninterrupted.</li>
<li><strong>Analytics:</strong> Access detailed insights into your API usage with comprehensive reports
available through your account dashboard. Monitor trends and make informed decisions based on your data
usage patterns.</li>
available through your account dashboard.</li>
<li><strong>Privacy:</strong> Your API activity is securely tied only to your account, ensuring that your
data remains private and protected from unauthorized access.</li>
<li><strong>Compliance and Monitoring:</strong> Ensure adherence to WeatherAPI's terms of service by
monitoring your usage. Track API consumption effortlessly to avoid unexpected limits or disruptions in
service.</li>
<li><strong>Compliance:</strong> Ensure adherence to WeatherAPI's terms of service and usage policies, and
avoiding violations.</li>
</ul>
</section>

Expand Down
52 changes: 26 additions & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ <h3 id="bookmarkViewAs">View as</h3>
<div class="hangno" id="aiToolsIcon">
<div class="icon">
<svg fill="none" height="100%" viewBox="0 0 280 280" width="100%" xmlns="http://www.w3.org/2000/svg">
<path class="accentColor" clip-rule="evenodd"
<path id="aiIcon" class="accentColor" clip-rule="evenodd"
d="M152 178C152 163.641 163.641 152 178 152H254C268.359 152 280.275 163.76 277.393 177.827C267.155 227.797 227.797 267.155 177.827 277.393C163.76 280.275 152 268.359 152 254V178ZM128 183.26C128 206.423 99.9943 218.024 83.6152 201.645L8.78205 126.811C3.43206 121.461 0.529946 114.017 1.78833 106.556C10.5659 54.5162 50.7487 13.1442 102.17 2.60743C116.237 -0.275091 128 11.6406 128 26V183.26ZM0 214.74C0 191.577 28.0057 179.976 44.3847 196.355L127.994 279.964C127.998 279.968 128 279.974 128 279.979V279.979C128 279.991 127.991 280 127.979 280H26C11.6406 280 0 268.359 0 254V214.74ZM152 26C152 11.6406 163.641 0 178 0H254C268.359 0 280 11.6406 280 26V102C280 116.359 268.359 128 254 128H178C163.641 128 152 116.359 152 102V26Z"
fill="white" fill-rule="evenodd" />
</svg>
Expand Down Expand Up @@ -1103,7 +1103,7 @@ <h1>Material You NewTab</h1>
<!-- ---🟡--- -->
<div class="ttcont">
<div class="texts">
<div class="bigText" id="digitalclocktittle">Digital Clock</div>
<div class="bigText" id="digitalclocktitle">Digital Clock</div>
<div class="infoText" id="digitalclockinfo">Switch to the digital clock</div>
</div>
<label class="switch">
Expand All @@ -1113,7 +1113,7 @@ <h1>Material You NewTab</h1>
</div>
<div class="ttcont" id="timeformatField">
<div class="texts">
<div class="bigText" id="timeformattittle">12-Hour Format</div>
<div class="bigText" id="timeformattitle">12-Hour Format</div>
<div class="infoText" id="timeformatinfo">Use 12-hour time format</div>
</div>
<label class="switch">
Expand All @@ -1123,7 +1123,7 @@ <h1>Material You NewTab</h1>
</div>
<div class="ttcont" id="greetingField">
<div class="texts">
<div class="bigText" id="greetingtittle">Greeting</div>
<div class="bigText" id="greetingtitle">Greeting</div>
<div class="infoText" id="greetinginfo">Show greeting below custom text</div>
</div>
<label class="switch">
Expand Down Expand Up @@ -1291,30 +1291,30 @@ <h1>Material You NewTab</h1>
</svg>
</div>

<!-- Language selection button -->
<!-- LANGUAGE SELECTION OPTIONS -->
<select class="languageSelector" id="languageSelector">
<option value="en">English</option>
<option value="az">Azərbaycanca (Azerbaijani)</option>
<option value="bn">বাংলা (Bangla)</option>
<option value="zh">简体中文 (Simplified Chinese)</option>
<option value="zh_TW">繁體中文 (Traditional Chinese)</option>
<option value="cs">Čeština (Czech)</option>
<option value="fr">Français (French)</option>
<option value="hi">हिन्दी (Hindi)</option>
<option value="hu">Magyar (Hungarian)</option>
<option value="idn">Bahasa Indonesia (Indonesian)</option>
<option value="it">Italiano (Italian)</option>
<option value="ja">日本語 (Japanese)</option>
<option value="ko">한국어 (Korean)</option>
<option value="mr">मराठी (Marathi)</option>
<option value="np">नेपाली (Nepali)</option>
<option value="pt">Português (Portuguese)</option>
<option value="ru">Русский (Russian)</option>
<option value="sl">Slovenščina (Slovenian)</option>
<option value="es">Español (Spanish)</option>
<option value="tr">Türkçe (Turkish)</option>
<option value="uz">O'zbek (Uzbek)</option>
<option value="vi">Tiếng Việt (Vietnamese)</option>
<option value="az">Azerbaijani (Azərbaycanca)</option>
<option value="bn">Bangla (বাংলা)</option>
<option value="zh">Chinese (Simplified) (简体中文)</option>
<option value="zh_TW">Chinese (Traditional) (繁體中文)</option>
<option value="cs">Czech (Čeština)</option>
<option value="fr">French (Français)</option>
<option value="hi">Hindi (हिन्दी)</option>
<option value="hu">Hungarian (Magyar)</option>
<option value="idn">Indonesian (Bahasa Indonesia)</option>
<option value="it">Italian (Italiano)</option>
<option value="ja">Japanese (日本語)</option>
<option value="ko">Korean (한국어)</option>
<option value="mr">Marathi (मराठी)</option>
<option value="np">Nepali (नेपाली)</option>
<option value="pt">Portuguese (Brazil) (Português)</option>
<option value="ru">Russian (Русский)</option>
<option value="sl">Slovenian (Slovenščina)</option>
<option value="es">Spanish (Español)</option>
<option value="tr">Turkish (Türkçe)</option>
<option value="uz">Uzbek (O'zbek)</option>
<option value="vi">Vietnamese (Tiếng Việt)</option>
<!-- Place new language alphabetically -->
</select>
<!-- end of languageSelector -->
Expand Down
69 changes: 57 additions & 12 deletions locales/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,69 @@
## Adding a New Translation

1. **Create a new translation file**
- Name the file using the appropriate language code (e.g., `de.js` for German or `ar.js` for Arabic).
1. **Create a New Translation File**
- Name the file using the appropriate language code (e.g., `de.js` for German or `ar_SA.js` for Arabic).
- Copy the content from `en.js` and paste it into the new file. Translate the strings as needed.
- Delete any inline comments meant for instructions.
- Place this file in the `locales` directory.

2. **Add the locale to `index.html`**
<br>

2. **Add the Locale to `index.html`**
- Open `index.html` and locate the `<!-- LANGUAGES SCRIPTS -->` section.
- Add your new locale script tag in the correct order, as follows:
- Add your new locale script tag in chronological order, like this:
```html
<script src="locales/de.js"></script>
```
- Locate the `<!-- LANGUAGE SELECTION OPTIONS -->` section and add the new language option in lexicographical order:
```html
<option value="de">German (Deutsch)</option>
```

<br>

3. **Update Date Format in `clock.js`**
- Add the date display for both analog and digital clocks if the format differs from the default, ensuring chronological order.
- Follow the local conventions for date formatting.
- Ensure the digital clock display is correct regarding the 12-hour mode.

<br>

4. **Add the Locale to `languages.js`**
- Add the language to `languages.js` in chronological order.
- Check if the `menuWidth` needs to be adjusted.
- If the language uses a comma instead of a dot as the decimal separator, make the necessary adjustments in the appropriate array.

<br>

5. **Update the Currently Supported Languages Section in `README.md`**
- Add the new language to the list of supported languages in the README, ensuring lexicographical order.
- Increase the count by 1 in both the header and the link at the top.

<br>

6. **Add the Locale to `tools/languagesAnalysis.html`**
- (You can use this tool to get an overview of missing or extra strings in the language.)
- Add the new language script tag in chronological order:
```html
<script src="../locales/de.js"></script>
```
- Add the language to the languages object in lexicographical order.

<br>

7. **Subscribe to Translation Updates for Contributors** (Optional)
- Join the [discussion channel](https://github.com/XengShi/materialYouNewTab/discussions/195) or mailing list to receive notifications about new lines being added to translations.

3. **Test the translation**
- Verify that your translations are displayed correctly when the respective locale is selected.
<br>

4. **Keep translations consistent**
- Follow the structure of existing translation files to ensure consistency across all locales.
### Notes:
- **Test the Translation**: Verify that the translations display correctly when the respective locale is selected, including hover texts and alerts.
- **Confirm in `weather.js`**: Ensure the humidity value stays on a single line. If it moves to a second line, increase the minimum width.
- **Keep Translations Consistent**: Ensure the structure of the new translation file matches existing ones for consistency across locales.
- **Additional Considerations**: Some languages may require specific adjustments based on regional needs.

5. **Subscribe to Translation Updates for Contributors** (optional)
- Join the #195 channel or mailing list to receive notifications about new lines being added to translations.
---

6. **Update the Currently Supported Languages section in the `README.md`**
- Add the new language to the list of supported languages in the README, following the existing format.
### Definitions:
- **Lexicographical Order**: Alphabetical order based on the first character of each word.
- **Chronological Order**: The order in which languages are added, from the earliest to the most recent.
6 changes: 3 additions & 3 deletions locales/az.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const az = {
// "todoPlaceholder": "Add task...",

// Digital Clock
"digitalclocktittle": "Rəqəmsal saat",
"digitalclocktitle": "Rəqəmsal saat",
"digitalclockinfo": "Rəqəmsal saata keç",
"timeformattittle": "12 Saat Format",
"timeformattitle": "12 Saat Format",
"timeformatinfo": "12 saatlıq vaxt formatından istifadə edin",
"greetingtittle": "Xoş gəlmisiniz",
"greetingtitle": "Xoş gəlmisiniz",
"greetinginfo": "Fərdi mətnin altında salamlama mesajını göstər",

// Misc
Expand Down
9 changes: 5 additions & 4 deletions locales/bn.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const bn = {
"todoPlaceholder": "টাস্ক যোগ করুন...",

// Digital Clock
"digitalclocktittle": "ডিজিটাল ঘড়ি",
"digitalclocktitle": "ডিজিটাল ঘড়ি",
"digitalclockinfo": "ডিজিটাল ঘড়িতে পরিবর্তন করুন",
"timeformattittle": "১২-ঘণ্টা ফরম্যাট",
"timeformattitle": "১২-ঘণ্টা ফরম্যাট",
"timeformatinfo": "১২-ঘণ্টার সময় ফরম্যাট ব্যবহার করুন",
"greetingtittle": "অভিবাদন",
"greetingtitle": "অভিবাদন",
"greetinginfo": "কাস্টম টেক্সটের নিচে অভিবাদন দেখান",

// Misc
Expand Down Expand Up @@ -70,6 +70,8 @@ const bn = {
"userAPI": "আপনার WeatherAPI কী",
"LearnMoreButton": "আরও জানুন",
"saveAPI": "সংরক্ষণ করুন",
"hideWeatherBox": "আবহাওয়া কার্ড লুকান",
"hideWeatherBoxInfo": "শুধুমাত্র তাপমাত্রা পিল দেখান",

// Body Items
// Calendar
Expand Down Expand Up @@ -138,5 +140,4 @@ const bn = {
"invalidBackup": "অবৈধ ব্যাকআপ ফাইল নির্বাচিত হয়েছে।",
"deleteBookmark": "আপনি কি নিশ্চিত যে আপনি \"{title}\" বুকমার্কটি মুছে ফেলতে চান?",
"UnsupportedBrowser": "আপনার ব্রাউজারে বুকমার্ক সমর্থিত নয়।",
"BookmarksDenied": "বুকমার্ক অনুমতি প্রদান করা হয়নি।",
};
7 changes: 3 additions & 4 deletions locales/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const cs = {
"todoPlaceholder": "Přidat úkol...",

// Digital Clock
"digitalclocktittle": "Digitální hodiny",
"digitalclocktitle": "Digitální hodiny",
"digitalclockinfo": "Přepne hodiny na digitální",
"timeformattittle": "12hodinový formát",
"timeformattitle": "12hodinový formát",
"timeformatinfo": "Použije se 12hodinový formát času",
"greetingtittle": "Pozdrav",
"greetingtitle": "Pozdrav",
"greetinginfo": "Zobrazí pozdrav pod upravitelným textem",

// Misc
Expand Down Expand Up @@ -136,5 +136,4 @@ const cs = {
"invalidBackup": "Neplatný soubor se zálohou",
"deleteBookmark": "Opravdu si přejete smazat tuto záložku \"{title}\"?",
"UnsupportedBrowser": "Ve vašem prohlížeči nejsou záložky podporované",
"BookmarksDenied": "Nebylo přiděleno oprávnění pro záložky.",
};
11 changes: 5 additions & 6 deletions locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const en = {
"todoPlaceholder": "Add task...",

// Digital Clock
"digitalclocktittle": "Digital Clock",
"digitalclocktitle": "Digital Clock",
"digitalclockinfo": "Switch to the digital clock",
"timeformattittle": "12-Hour Format",
"timeformattitle": "12-Hour Format",
"timeformatinfo": "Use 12-hour time format",
"greetingtittle": "Greeting",
"greetingtitle": "Greeting",
"greetinginfo": "Show greeting below custom text",

// Misc
Expand Down Expand Up @@ -70,8 +70,8 @@ const en = {
"userAPI": "Your weatherAPI key",
"LearnMoreButton": "Learn more",
"saveAPI": "Save",
"hideWeatherBox": "Hide Weather Card",
"hideWeatherBoxInfo": "Only show temperature on mobile",
"hideWeatherBox": "Hide Weather Card", // Toggle for mobile devices only
"hideWeatherBoxInfo": "Show only temperature pill",

// Body Items
// Calendar
Expand Down Expand Up @@ -142,5 +142,4 @@ const en = {
"invalidBackup": "Invalid backup file selected.",
"deleteBookmark": "Are you sure you want to delete the bookmark \"{title}\"?", // Do not translate {title}
"UnsupportedBrowser": "Bookmarks are not supported in your browser.",
"BookmarksDenied": "Bookmarks permission has not been granted.",
};
6 changes: 3 additions & 3 deletions locales/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const es = {
// "todoPlaceholder": "Add task...",

// Digital Clock
"digitalclocktittle": "Reloj digital",
"digitalclocktitle": "Reloj digital",
"digitalclockinfo": "Cambiar a reloj digital",
"timeformattittle": "Formato de 12 horas",
"timeformattitle": "Formato de 12 horas",
"timeformatinfo": "Usar formato de 12 horas",
"greetingtittle": "Saludo",
"greetingtitle": "Saludo",
"greetinginfo": "Mostrar saludo debajo del texto personalizado",

// Misc
Expand Down
7 changes: 3 additions & 4 deletions locales/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ const fr = {
"todoPlaceholder": "Ajouter une tâche...",

// Digital Clock
"digitalclocktittle": "Horloge Numérique",
"digitalclocktitle": "Horloge Numérique",
"digitalclockinfo": "Passer à l'horloge numérique",
"timeformattittle": "Format 12h",
"timeformattitle": "Format 12h",
"timeformatinfo": "Utiliser le format 12h",
"greetingtittle": "Salutation",
"greetingtitle": "Salutation",
"greetinginfo": "Afficher la salutation sous le texte personnalisé",

// Misc
Expand Down Expand Up @@ -136,5 +136,4 @@ const fr = {
"invalidBackup": "Fichier de sauvegarde invalide",
"deleteBookmark": "Êtes-vous sûr de vouloir supprimer le favori \"{title}\"?",
"UnsupportedBrowser": "Les favoris ne sont pas supportés dans votre navigateur.",
"BookmarksDenied": "L'autorisation pour les favoris n'a pas été accordée."
};
Loading

0 comments on commit 560ead4

Please sign in to comment.