Skip to content

Commit

Permalink
Change readme + versionbump + build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daandelange committed Feb 10, 2022
1 parent 329d6c1 commit 62c1198
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 28 deletions.
43 changes: 21 additions & 22 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ Beta : This is a work in progress port of translations to Kirby 3. The "saved" s

This plugin enhances the translation handling of pages for [Kirby 3](http://getkirby.com) with the following features:

## How it works

The plugin automatically detects if there's a language `.txt` file for the current page in your content folder and displays additional language tabs. For now there are two possible states:

+ **RED**: The translated `.txt`-file does not exist
+ **GREEN**: The translated `.txt`-file exists
- The language menu explicitly shows if the translation exists :
- **RED**: The translated `.txt`-file does not exist
- **GREEN**: The translated `.txt`-file exists

For all non-default languages you can:

- delete a translation (without deleting the whole page)
- resynchronise translations with the default language file
- Delete a translation (without deleting the whole page).
- Resynchronise translations with the default language file (revert).

Also, the plugin offers an option to replace the kirby languages menu by an enhanced one.

Expand Down Expand Up @@ -54,7 +51,21 @@ git submodule add https://github.com/daandelange/k3-translations.git site/plugin

## Setup

Add the following `section` to your blueprint.
### Replacing Kirby's native language menu
Within your website project, you can customise the header language menu as such:

```php
// Site /site/config/config.php
return [
'daandelange.translations.options.header.replaceKirbyLanguages': false, // To disable replacing the native lang menu
'daandelange.translations.options.header.compactMode': true, // To enable compact mode
'daandelange.translations.options.header.delete': false, // To disallow deleting a language
'daandelange.translations.options.header.revert': false, // To disallow reverting a language
];
```

### Translations Section
Add the following `section` to your blueprint. (optional)

```yaml
sections:
Expand All @@ -80,16 +91,8 @@ sections:
revertable: false
```
To replace kirby's default language switcher in the header, do …
```yaml
sections:
translations:
type: translations
portaled: false
```
To use a more compact layout, do … *(automatically enabled if portaled)*
To use a more compact layout, do …
```yaml
sections:
Expand All @@ -100,10 +103,6 @@ sections:
Of course, you can combine all options.
## Known issues
For Kirby 3.5 and before, using the default language switcher in the Panel breaks the display of the actions (delete, revert), but this should be fixed for Kirby 3.6+
## Development
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "daandelange/k3-translations",
"description": "Translations field and section for Kirby 3",
"homepage": "https://github.com/Daandelange/k3-translations",
"version": "0.1.0-beta",
"version": "0.2.0-beta",
"type": "kirby-plugin",
"license": "MIT",
"authors": [
Expand Down
2 changes: 1 addition & 1 deletion index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion index.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'delete' => true,
'revert' => true,
],

],
'sections' => [
'translations' => [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Translations",
"version": "0.1.0-beta",
"version": "0.2.0-beta",
"description": "Translations field and section for Kirby 3",
"main": "index.js",
"author": "Daan de Lange",
Expand All @@ -14,6 +14,6 @@
"recognizeSelfClosing": true
},
"devDependencies": {
"kirbyup": "^0.18.0"
"kirbyup": "latest"
}
}

0 comments on commit 62c1198

Please sign in to comment.