Skip to content

Commit

Permalink
Update API, default language strings
Browse files Browse the repository at this point in the history
  • Loading branch information
markseuffert committed Oct 9, 2023
1 parent c6165f7 commit b0d1b96
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README-sv.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions system/extensions/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -819,7 +819,7 @@ public function set($language) {
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
Expand Down
8 changes: 4 additions & 4 deletions system/extensions/update-current.ini
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions system/extensions/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -537,12 +537,18 @@ public function updateLanguageSettings($extension, $action) {
$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");
}
}
}
}
Expand Down

0 comments on commit b0d1b96

Please sign in to comment.