Update API, default language strings

This commit is contained in:
markseu 2023-10-09 16:29:04 +02:00
parent c6165f7f34
commit b0d1b96f34
6 changed files with 19 additions and 13 deletions

View file

@ -2,7 +2,7 @@
# Datenstrom Yellow 0.8.22
Datenstrom Yellow ist für Menschen die kleine Webseiten machen. Die wichtigsten Dinge für kleine Webseiten sind mit dabei. Du kannst Funktionen, Sprachen und Themes hinzufügen. Datenstrom Yellow funktioniert als Content-Management-System und Static-Site-Generator. [Herunterladen](https://github.com/datenstrom/yellow/archive/main.zip) und [loslegen](https://datenstrom.se/de/yellow/help/how-to-get-started).
Datenstrom Yellow ist für Menschen die kleine Webseiten machen. Die wichtigsten Dinge für kleine Webseiten sind mit dabei. Du kannst Funktionen, Sprachen und Themes hinzufügen. Datenstrom Yellow funktioniert als Content-Management-System und Static-Site-Generator. [Datenstrom Yellow herunterladen](https://github.com/datenstrom/yellow/archive/main.zip) und [loslegen](https://datenstrom.se/de/yellow/help/how-to-get-started).
## Erweiterungen

View file

@ -2,7 +2,7 @@
# Datenstrom Yellow 0.8.22
Datenstrom Yellow är för människor som skapar små webbsidor. De viktigaste sakerna för små webbsidor ingår. Du kan lägga till funktioner, språk och teman. Datenstrom Yellow fungerar som webbpubliceringssystem och static-site-generator. [Ladda ner](https://github.com/datenstrom/yellow/archive/main.zip) och [komma igång](https://datenstrom.se/sv/yellow/help/how-to-get-started).
Datenstrom Yellow är för människor som skapar små webbsidor. De viktigaste sakerna för små webbsidor ingår. Du kan lägga till funktioner, språk och teman. Datenstrom Yellow fungerar som webbpubliceringssystem och static-site-generator. [Ladda ner Datenstrom Yellow](https://github.com/datenstrom/yellow/archive/main.zip) och [komma igång](https://datenstrom.se/sv/yellow/help/how-to-get-started).
## Tillägg

View file

@ -2,7 +2,7 @@
# Datenstrom Yellow 0.8.22
Datenstrom Yellow is for people who make small websites. The most important things for small websites are included. You can add features, languages and themes. Datenstrom Yellow works as content management system and static site generator. [Download](https://github.com/datenstrom/yellow/archive/main.zip) and [get started](https://datenstrom.se/yellow/help/how-to-get-started).
Datenstrom Yellow is for people who make small websites. The most important things for small websites are included. You can add features, languages and themes. Datenstrom Yellow works as content management system and static site generator. [Download Datenstrom Yellow](https://github.com/datenstrom/yellow/archive/main.zip) and [get started](https://datenstrom.se/yellow/help/how-to-get-started).
## Extensions

View file

@ -2,7 +2,7 @@
// Core extension, https://github.com/annaesvensson/yellow-core
class YellowCore {
const VERSION = "0.8.118";
const VERSION = "0.8.119";
const RELEASE = "0.8.22";
public $content; // content files
public $media; // media files
@ -819,7 +819,7 @@ class YellowLanguage {
public function setDefault($key, $value, $language) {
if (!isset($this->settings[$language])) $this->settings[$language] = new YellowArray();
$this->settings[$language][$key] = $value;
$this->settingsDefaults[$key] = $value;
$this->settingsDefaults[$key] = true;
}
// Set default language settings

View file

@ -1,11 +1,11 @@
# Datenstrom Yellow update settings
Extension: Core
Version: 0.8.118
Version: 0.8.119
Description: Core functionality of your website.
DocumentationUrl: https://github.com/annaesvensson/yellow-core
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip
Published: 2023-09-20 21:28:20
Published: 2023-10-09 15:42:38
Developer: Anna Svensson
Tag: feature
system/extensions/core.php: core.php, create, update
@ -111,11 +111,11 @@ system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, crea
system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful
Extension: Update
Version: 0.8.94
Version: 0.8.95
Description: Keep your website up to date.
DocumentationUrl: https://github.com/annaesvensson/yellow-update
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/update.zip
Published: 2023-04-19 20:46:53
Published: 2023-10-09 15:53:34
Developer: Anna Svensson
Tag: feature
system/extensions/update.php: update.php, create, update

View file

@ -2,7 +2,7 @@
// Update extension, https://github.com/annaesvensson/yellow-update
class YellowUpdate {
const VERSION = "0.8.94";
const VERSION = "0.8.95";
const PRIORITY = "2";
public $yellow; // access to API
public $extensions; // number of extensions
@ -537,12 +537,18 @@ class YellowUpdate {
$language = $matches[2];
$settings = new YellowArray();
$settings["language"] = $language;
$settings["languageLocale"] = "n/a";
$settings["languageDescription"] = "n/a";
$settings["languageTranslator"] = "Unknown";
foreach ($this->yellow->language->settingsDefaults as $key=>$value) {
$require = preg_match("/^([a-z]*)[A-Z]+/", $key, $tokens) ? $tokens[1] : "core";
if ($require=="language") $require = "core";
if ($this->yellow->extension->isExisting($require) &&
$this->yellow->language->isText($key, $language)) {
$settings[$key] = $this->yellow->language->getText($key, $language);
if ($this->yellow->extension->isExisting($require)) {
if ($this->yellow->language->isText($key, $language)) {
$settings[$key] = $this->yellow->language->getText($key, $language);
} else {
$settings[$key] = $this->yellow->language->getText($key, "en");
}
}
}
}