Plugin Directory

Changeset 3420407


Ignore:
Timestamp:
12/15/2025 05:40:51 PM (2 months ago)
Author:
spelhubben
Message:

Release 1.8.2: <Corrected asset paths for Leaflet library (vendor directory structure)>

Location:
spelhubben-weather/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • spelhubben-weather/trunk/admin/admin.php

    r3420396 r3420407  
    6868                'css' => array(
    6969                    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',
    7171                ),
    7272                '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',
    7574                    trailingslashit( SV_VADER_URL ) . 'assets/map.js',
    7675                ),
    7776                'svv' => array(
    78                     'iconBase' => trailingslashit( SV_VADER_URL ) . 'assets/leaflet/images/',
     77                    'iconBase' => trailingslashit( SV_VADER_URL ) . 'assets/vendor/leaflet/images/',
    7978                ),
    8079            ),
  • spelhubben-weather/trunk/readme.txt

    r3420396 r3420407  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.8.1
     7Stable tag: 1.8.2
    88Donate link: https://www.paypal.com/donate/?hosted_button_id=CV74CEXY5XEAU
    99License: GPLv2 or later
     
    9999
    100100= 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`.
     101The 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`.
    102102
    103103= GDPR / privacy? =
     
    109109- Map not visible: ensure `map="1"` and that your theme/container is wide/tall enough; increase `map_height`.
    110110- Rate limiting: reduce refreshes or increase cache TTL.
    111 
    112 
     111== Translations ==
     112
     113The 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**
     123If you need to add or modify translations locally:
     124
     1251. **Generate or update the POT file** (translation template):
     126   ```
     127   wp i18n make-pot . languages/spelhubben-weather.pot --slug=spelhubben-weather
     128   ```
     129
     1302. **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
     1363. **Generate the MO file** (compiled binary format):
     137   ```
     138   msgfmt spelhubben-weather-de_DE.po -o spelhubben-weather-de_DE.mo
     139   ```
     140
     1414. **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
     1485. **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```
     154languages/
     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)
    113174== Screenshots ==
    1141751. Frontend examples: inline, compact, card, detailed, with optional map.
     
    117178
    118179== 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
    119186= 1.8.1 =
    120187- **New:** 3 selectable icon themes: **Classic**, **Modern Flat**, and **Modern Gradient** (set in Settings → Icon style).
  • spelhubben-weather/trunk/spelhubben-weather.php

    r3420396 r3420407  
    33 * Plugin Name: Spelhubben Weather
    44 * 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.1
     5 * Version: 1.8.2
    66 * Author: Spelhubben
    77 * Text Domain: spelhubben-weather
     
    1919// ── Constants (kept for backward compatibility).
    2020if ( ! defined( 'SV_VADER_VER' ) ) {
    21     define( 'SV_VADER_VER', '1.8.1' );
     21    define( 'SV_VADER_VER', '1.8.2' );
    2222}
    2323if ( ! defined( 'SV_VADER_DIR' ) ) {
Note: See TracChangeset for help on using the changeset viewer.