Changeset 3420407
- Timestamp:
- 12/15/2025 05:40:51 PM (2 months ago)
- Location:
- spelhubben-weather/trunk
- Files:
-
- 3 edited
-
admin/admin.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
spelhubben-weather.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
spelhubben-weather/trunk/admin/admin.php
r3420396 r3420407 68 68 'css' => array( 69 69 trailingslashit( SV_VADER_URL ) . 'assets/style.css', 70 trailingslashit( SV_VADER_URL ) . 'assets/ leaflet/leaflet.css',70 trailingslashit( SV_VADER_URL ) . 'assets/vendor/leaflet/leaflet.css', 71 71 ), 72 72 'js' => array( 73 trailingslashit( SV_VADER_URL ) . 'assets/leaflet/leaflet.js', 74 trailingslashit( SV_VADER_URL ) . 'assets/widget.js', 73 trailingslashit( SV_VADER_URL ) . 'assets/vendor/leaflet/leaflet.js', 75 74 trailingslashit( SV_VADER_URL ) . 'assets/map.js', 76 75 ), 77 76 'svv' => array( 78 'iconBase' => trailingslashit( SV_VADER_URL ) . 'assets/ leaflet/images/',77 'iconBase' => trailingslashit( SV_VADER_URL ) . 'assets/vendor/leaflet/images/', 79 78 ), 80 79 ), -
spelhubben-weather/trunk/readme.txt
r3420396 r3420407 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1.8. 17 Stable tag: 1.8.2 8 8 Donate link: https://www.paypal.com/donate/?hosted_button_id=CV74CEXY5XEAU 9 9 License: GPLv2 or later … … 99 99 100 100 = Translations? = 101 The plugin is fully translatable. **Included translations:** **Swedish (sv_SE), Norwegian (nb_NO) , English (en_US)**. Strings are also available on translate.wordpress.org. Ship `.pot/.po/.mo` in `/languages`.101 The plugin is fully translatable. **Included translations:** **Swedish (sv_SE), Norwegian (nb_NO)**. Strings are also available on translate.wordpress.org. Ship `.pot/.po/.mo` in `/languages`. 102 102 103 103 = GDPR / privacy? = … … 109 109 - Map not visible: ensure `map="1"` and that your theme/container is wide/tall enough; increase `map_height`. 110 110 - Rate limiting: reduce refreshes or increase cache TTL. 111 112 111 == Translations == 112 113 The plugin is **fully translatable** and includes built-in translations for **Swedish (sv_SE)** and **Norwegian Bokmål (nb_NO)**. 114 115 === How to translate the plugin === 116 117 **Option 1: Contribute to translate.wordpress.org (recommended)** 118 - Visit [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/spelhubben-weather/) 119 - Select your language and add translations via the browser interface 120 - Your translations will automatically be included in future releases 121 122 **Option 2: Local translation files** 123 If you need to add or modify translations locally: 124 125 1. **Generate or update the POT file** (translation template): 126 ``` 127 wp i18n make-pot . languages/spelhubben-weather.pot --slug=spelhubben-weather 128 ``` 129 130 2. **Create a PO file for your language** (e.g., `spelhubben-weather-de_DE.po`): 131 - Copy the `.pot` file and rename to match your locale (e.g., `de_DE`) 132 - Use a translation tool like [Poedit](https://poedit.net/) or a text editor 133 - Translate all strings in the PO file 134 - Save the file as `spelhubben-weather-de_DE.po` 135 136 3. **Generate the MO file** (compiled binary format): 137 ``` 138 msgfmt spelhubben-weather-de_DE.po -o spelhubben-weather-de_DE.mo 139 ``` 140 141 4. **Place files in the plugin**: 142 - Store both `.po` and `.mo` files in `/languages/` 143 - Also generate a `.l10n.php` file (WordPress 6.0+): 144 ``` 145 wp i18n make-json languages/spelhubben-weather-de_DE.po --no-purge 146 ``` 147 148 5. **Activate your translation**: 149 - Change your WordPress language to match the locale code (Settings → General → Site Language) 150 - The plugin will automatically load the translated strings 151 152 **Translation file structure**: 153 ``` 154 languages/ 155 spelhubben-weather.pot (template for all translations) 156 spelhubben-weather-sv_SE.po (Swedish source text) 157 spelhubben-weather-sv_SE.mo (Swedish compiled) 158 spelhubben-weather-sv_SE.l10n.php 159 spelhubben-weather-nb_NO.po (Norwegian source text) 160 spelhubben-weather-nb_NO.mo (Norwegian compiled) 161 spelhubben-weather-nb_NO.l10n.php 162 ``` 163 164 **What gets translated**: 165 - All frontend strings (shortcode output, widget labels, weather descriptions, WMO codes) 166 - Admin settings and UI labels 167 - JavaScript strings (expand/collapse, status messages) 168 - Error messages and notices 169 170 **Best practices**: 171 - Use context clues in the POT file (`msgctxt`) to distinguish similar phrases 172 - Test your translation in WordPress to ensure formatting and plurals work correctly 173 - Check that translated UI aligns properly in your language (RTL vs LTR) 113 174 == Screenshots == 114 175 1. Frontend examples: inline, compact, card, detailed, with optional map. … … 117 178 118 179 == Changelog == 180 = 1.8.2 = 181 - **Fix:** WordPress naming convention compliance – all global functions and variables now use proper `sv_vader_` prefix. 182 - **Fix:** Corrected asset paths for Leaflet library (vendor directory structure). 183 - **Tech:** Code review and standards compliance (no breaking changes). 184 - Tested up to: WordPress 6.9 185 119 186 = 1.8.1 = 120 187 - **New:** 3 selectable icon themes: **Classic**, **Modern Flat**, and **Modern Gradient** (set in Settings → Icon style). -
spelhubben-weather/trunk/spelhubben-weather.php
r3420396 r3420407 3 3 * Plugin Name: Spelhubben Weather 4 4 * Description: Displays current weather and an optional forecast with a simple consensus across providers (Open-Meteo, SMHI, Yr/MET Norway). Supports shortcode + Gutenberg block + classic widget. Optional Leaflet map, subtle animations, daily forecast, and multiple layouts. 5 * Version: 1.8. 15 * Version: 1.8.2 6 6 * Author: Spelhubben 7 7 * Text Domain: spelhubben-weather … … 19 19 // ── Constants (kept for backward compatibility). 20 20 if ( ! defined( 'SV_VADER_VER' ) ) { 21 define( 'SV_VADER_VER', '1.8. 1' );21 define( 'SV_VADER_VER', '1.8.2' ); 22 22 } 23 23 if ( ! defined( 'SV_VADER_DIR' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.