Skip to content

Commit

Permalink
Merge branch 'theme-designer'
Browse files Browse the repository at this point in the history
  • Loading branch information
lakejason0 committed Nov 21, 2021
2 parents 12c496a + cd12d33 commit 2b6eaa9
Show file tree
Hide file tree
Showing 9 changed files with 2,225 additions and 35 deletions.
37 changes: 36 additions & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,29 @@
"lakeus-theme-designer-test-theme": "Test theme",
"lakeus-theme-designer-clear-theme": "End testing",
"lakeus-theme-designer-reset-theme": "Reset",
"lakeus-theme-designer-invert-auto-calculate-selection": "Invert auto calculate selection",
"lakeus-theme-designer-copied": "Theme code has been copied to your clipboard.",
"lakeus-theme-designer-copy-failed": "Failed to copy the theme code to your clipboard; result is at the end of the designer.",
"lakeus-theme-designer-reload": "Reload",
"lakeus-theme-designer-color-picker-fallback": "Use text input for color pickers",
"lakeus-theme-designer-alpha-channel": "Alpha (Opacity)",
"lakeus-theme-designer-basic": "Basic",
"lakeus-theme-designer-color-primary": "Primary color (foreground)",
"lakeus-theme-designer-color-secondary": "Secondary color (background)",
"lakeus-theme-designer-global": "Global",
"lakeus-theme-designer-background-color-base": "HTML background color",
"lakeus-theme-designer-color-link": "Link color",
"lakeus-theme-designer-color-link--visited": "Visited link color",
"lakeus-theme-designer-color-link--active": "Active link color",
"lakeus-theme-designer-color-link-new": "New link color",
"lakeus-theme-designer-color-link-new--visited": "Visited new link color",
"lakeus-theme-designer-color-link-new--active": "Active new link color",
"lakeus-theme-designer-color-link-footer": "Footer link color",
"lakeus-theme-designer-color-link-footer--visited": "Visited footer link color",
"lakeus-theme-designer-color-link-footer--active": "Active footer link color",
"lakeus-theme-designer-color-link-external": "External link color",
"lakeus-theme-designer-color-link-external--visited": "Visited external link color",
"lakeus-theme-designer-color-link-external--active": "Active external link color",
"lakeus-theme-designer-elevation": "Elevation",
"lakeus-theme-designer-font-family": "Default font family",
"lakeus-theme-designer-font-family-serif": "Default font family (Serif)",
Expand Down Expand Up @@ -66,6 +79,28 @@
"lakeus-theme-designer-font-family-headings": "Headings font family",
"lakeus-theme-designer-background-color-edit-options": "Edit options background color",
"lakeus-theme-designer-border-color-edit-options": "Edit options border color",
"lakeus-theme-designer-background-color-toc": "Table of contents background color",
"lakeus-theme-designer-border-color-toc": "Table of contents border color",
"lakeus-theme-designer-color-toc-number": "Table of contents number text color",
"lakeus-theme-designer-border-color-interface-message-box-neutral": "Interface message box neutral border color",
"lakeus-theme-designer-background-color-interface-message-box-neutral": "Interface message box neutral background color",
"lakeus-theme-designer-text-color-interface-message-box-neutral": "Interface message box neutral text color",
"lakeus-theme-designer-border-color-interface-message-box-warning": "Interface message box warning border color",
"lakeus-theme-designer-background-color-interface-message-box-warning": "Interface message box warning background color",
"lakeus-theme-designer-text-color-interface-message-box-warning": "Interface message box warning text color",
"lakeus-theme-designer-border-color-interface-message-box-error": "Interface message box error border color",
"lakeus-theme-designer-background-color-interface-message-box-error": "Interface message box error background color",
"lakeus-theme-designer-text-color-interface-message-box-error": "Interface message box error text color",
"lakeus-theme-designer-border-color-interface-message-box-success": "Interface message box success border color",
"lakeus-theme-designer-background-color-interface-message-box-success": "Interface message box success background color",
"lakeus-theme-designer-text-color-interface-message-box-success": "Interface message box success text color",
"lakeus-theme-designer-border-color-user-message": "Interface message box user message border color",
"lakeus-theme-designer-background-color-user-message": "Interface message box user message background color",
"lakeus-theme-designer-text-color-user-message": "Interface message box user message text color",
"lakeus-theme-designer-background-color-wikitable": "Table background color",
"lakeus-theme-designer-border-color-wikitable": "Table border color",
"lakeus-theme-designer-background-color-wikitable-table-head": "Table header background color",
"lakeus-theme-designer-text-color-wikitable": "Table text color",
"lakeus-theme-designer-portlet": "Dropdown menus",
"lakeus-theme-designer-background-color-portlet-body": "Dropdown menu background color",
"lakeus-theme-designer-background-color-portlet-item-hover": "Dropdown menu items hover color",
Expand All @@ -83,4 +118,4 @@
"lakeus-theme-designer-color-accent-header-tab-selected": "Action header selected tab text color",
"lakeus-theme-designer-color-accent-header-tab-new": "Action header new tab text color",
"lakeus-theme-designer-danger-zone": "Danger zone"
}
}
35 changes: 35 additions & 0 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,29 @@
"lakeus-theme-designer-test-theme": "A form button. Click it to test the theme out.",
"lakeus-theme-designer-clear-theme": "A form button. Click it to end testing.",
"lakeus-theme-designer-reset-theme": "A form button. Click it to reset the form.",
"lakeus-theme-designer-invert-auto-calculate-selection": "A form button. Click it to invert the automatic calculation selection.",
"lakeus-theme-designer-copied": "A notification text. Shows when theme code is successfully copied to the clipboard.",
"lakeus-theme-designer-copy-failed": "A notification text. Shows when theme code fails to be copied to the clipboard, instead going into the <pre> element at the end of the designer.",
"lakeus-theme-designer-reload": "A form button. Click it to reload the designer.",
"lakeus-theme-designer-color-picker-fallback": "A checkbox label. Checking it will change color pickers to text inputs for fallback use.",
"lakeus-theme-designer-alpha-channel": "A form input placeholder for alpha channel (opacity). It's probably a good idea to keep Alpha as-is, but don't if your language's grammar is against it.",
"lakeus-theme-designer-basic": "A form section title. Settings in this section is the most important ones, as they are the base variables that auto calculation depends on.",
"lakeus-theme-designer-color-primary": "A label of a setting. The primary (or accent, foreground) color.",
"lakeus-theme-designer-color-secondary": "A label of a setting. The secondary (used as background) color.",
"lakeus-theme-designer-global": "A form section title. Settings in this section will affect the whole page.",
"lakeus-theme-designer-background-color-base": "HTML background color, or the background color of the <code>&lt;html&gt;</code> element.",
"lakeus-theme-designer-color-link": "A label of a setting. The color of normal links.",
"lakeus-theme-designer-color-link--visited": "A label of a setting. The color of visited links.",
"lakeus-theme-designer-color-link--active": "A label of a setting. The color of active links.",
"lakeus-theme-designer-color-link-new": "A label of a setting. The color of new links.",
"lakeus-theme-designer-color-link-new--visited": "A label of a setting. The color of visited new links.",
"lakeus-theme-designer-color-link-new--active": "A label of a setting. The color of active new links.",
"lakeus-theme-designer-color-link-footer": "A label of a setting. The color of footer links.",
"lakeus-theme-designer-color-link-footer--visited": "A label of a setting. The color of visited footer links.",
"lakeus-theme-designer-color-link-footer--active": "A label of a setting. The color of active footer links.",
"lakeus-theme-designer-color-link-external": "A label of a setting. The color of external links.",
"lakeus-theme-designer-color-link-external--visited": "A label of a setting. The color of visited external links.",
"lakeus-theme-designer-color-link-external--active": "A label of a setting. The color of active external links.",
"lakeus-theme-designer-elevation": "A label of a setting. Shadow setting that is used by several elements.",
"lakeus-theme-designer-font-family": "A label of a setting. Default font family that is applied to the whole page.",
"lakeus-theme-designer-font-family-serif": "A label of a setting. Default serif font family. Could be applied to the headings.",
Expand Down Expand Up @@ -65,6 +78,28 @@
"lakeus-theme-designer-font-family-headings": "A label of a setting. Font family of the headings.",
"lakeus-theme-designer-background-color-edit-options": "A label of a setting. The background color of these edit options in wiki editor.",
"lakeus-theme-designer-border-color-edit-options": "A label of a setting. The border color of these edit options in wiki editor.",
"lakeus-theme-designer-background-color-toc": "A label of a setting. The background color of the table of contents.",
"lakeus-theme-designer-border-color-toc": "A label of a setting. The border color of the table of contents.",
"lakeus-theme-designer-color-toc-number": "A label of a setting. The text color of the title numbers in the table of contents.",
"lakeus-theme-designer-border-color-interface-message-box-neutral": "A label of a setting. The border color of the neutral message box.",
"lakeus-theme-designer-background-color-interface-message-box-neutral": "A label of a setting. The background color of the neutral message box.",
"lakeus-theme-designer-text-color-interface-message-box-neutral": "A label of a setting. The text color of the neutral message box.",
"lakeus-theme-designer-border-color-interface-message-box-warning": "A label of a setting. The border color of the warning message box.",
"lakeus-theme-designer-background-color-interface-message-box-warning": "A label of a setting. The background color of the warning message box.",
"lakeus-theme-designer-text-color-interface-message-box-warning": "A label of a setting. The text color of the warning message box.",
"lakeus-theme-designer-border-color-interface-message-box-error": "A label of a setting. The border color of the error message box.",
"lakeus-theme-designer-background-color-interface-message-box-error": "A label of a setting. The background color of the error message box.",
"lakeus-theme-designer-text-color-interface-message-box-error": "A label of a setting. The text color of the error message box.",
"lakeus-theme-designer-border-color-interface-message-box-success": "A label of a setting. The border color of the success message box.",
"lakeus-theme-designer-background-color-interface-message-box-success": "A label of a setting. The background color of the success message box.",
"lakeus-theme-designer-text-color-interface-message-box-success": "A label of a setting. The text color of the success message box.",
"lakeus-theme-designer-border-color-user-message": "A label of a setting. The border color of the message box informing users about their talk pages.",
"lakeus-theme-designer-background-color-user-message": "A label of a setting. The background color of the message box informing users about their talk pages.",
"lakeus-theme-designer-text-color-user-message": "A label of a setting. The text color of the message box informing users about their talk pages.",
"lakeus-theme-designer-background-color-wikitable": "A label of a setting. The background color of the table.",
"lakeus-theme-designer-border-color-wikitable": "A label of a setting. The border color of the table.",
"lakeus-theme-designer-background-color-wikitable-table-head": "A label of a setting. The background color of the table header.",
"lakeus-theme-designer-text-color-wikitable": "A label of a setting. The text color of the table.",
"lakeus-theme-designer-portlet": "A form section title. Settings in this section will affect the dropdown menus.",
"lakeus-theme-designer-background-color-portlet-body": "A label of a setting. The background color of dropdown menus.",
"lakeus-theme-designer-background-color-portlet-item-hover": "A label of a setting. The color of the dropdown menu items hovered on.",
Expand Down
23 changes: 23 additions & 0 deletions includes/Hooks.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Lakeus;

class Hooks
{
/**
* @see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Hooks/GetPreferences
* @param User $user
* @param array $preferences
*/
public static function onGetPreferences($user, &$preferences)
{
// A checkbox
$preferences['lakeus-enable-theme-designer'] = [
'type' => 'check',
'label-message' => 'lakeus-preferences-enable-theme-designer', // a system message
'help-message' => 'lakeus-preferences-enable-theme-designer-desc',
'section' => 'rendering/skin/skin-prefs',
'hide-if' => [ '!==', 'wpskin', 'lakeus' ],
];
}
}
3 changes: 0 additions & 3 deletions includes/SkinLakeus.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?php

// use SiteStats;

class SkinLakeus extends SkinMustache {

public const TEMPLATE_DIR = __DIR__ . '/templates';
Expand Down
Loading

0 comments on commit 2b6eaa9

Please sign in to comment.