mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
Renamed defaultLocale
setting to lang
refs https://github.com/TryGhost/Ghost/issues/10318 - API has been updated to still work with `default_locale` for backwards compatibility but it makes sense for the client to match the underlying settings keys
This commit is contained in:
parent
8984c0ae32
commit
99dbcdb3b0
@ -11,7 +11,7 @@ export default Model.extend(ValidationEngine, {
|
||||
coverImage: attr('string'),
|
||||
icon: attr('string'),
|
||||
accentColor: attr('string'),
|
||||
defaultLocale: attr('string'),
|
||||
lang: attr('string'),
|
||||
activeTimezone: attr('string', {defaultValue: 'Etc/UTC'}),
|
||||
codeinjectionHead: attr('string'),
|
||||
codeinjectionFoot: attr('string'),
|
||||
|
@ -126,7 +126,7 @@ export default class CustomViewsService extends Service {
|
||||
return;
|
||||
}
|
||||
|
||||
let views = JSON.parse(settings.get('sharedViews') || '{}');
|
||||
let views = JSON.parse(settings.get('sharedViews') || '[]');
|
||||
views = isArray(views) ? views : [];
|
||||
|
||||
let viewList = [];
|
||||
|
@ -76,23 +76,23 @@
|
||||
<div class="gh-setting-content">
|
||||
<div class="gh-setting-title">Publication Language</div>
|
||||
<div class="gh-setting-desc">Set the language/locale which is used on your site</div>
|
||||
{{#liquid-if this.defaultLocaleOpen}}
|
||||
{{#liquid-if this.langOpen}}
|
||||
<div class="gh-setting-content-extended">
|
||||
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="defaultLocale">
|
||||
<GhFormGroup @errors={{this.settings.errors}} @hasValidated={{this.settings.hasValidated}} @property="lang">
|
||||
<GhTextInput
|
||||
@value={{readonly this.settings.defaultLocale}}
|
||||
@input={{action (mut this.settings.defaultLocale) value="target.value"}}
|
||||
@focus-out={{action "validate" "defaultLocale" target=this.settings}}
|
||||
data-test-default-locale-input={{true}}
|
||||
@value={{readonly this.settings.lang}}
|
||||
@input={{action (mut this.settings.lang) value="target.value"}}
|
||||
@focus-out={{action "validate" "lang" target=this.settings}}
|
||||
data-test-input="lang"
|
||||
/>
|
||||
<GhErrorMessage @errors={{this.settings.errors}} @property="defaultLocale" />
|
||||
<GhErrorMessage @errors={{this.settings.errors}} @property="lang" />
|
||||
<p>Default: English (<strong>en</strong>); you can add translation files to your theme for <a href="https://ghost.org/docs/api/handlebars-themes/helpers/translate/" target="_blank" rel="noopener">any language</a></p>
|
||||
</GhFormGroup>
|
||||
</div>
|
||||
{{/liquid-if}}
|
||||
</div>
|
||||
<div class="gh-setting-action">
|
||||
<button type="button" class="gh-btn" {{action (toggle "defaultLocaleOpen" this)}} data-test-toggle-default-locale><span>{{if this.defaultLocaleOpen "Close" "Expand"}}</span></button>
|
||||
<button type="button" class="gh-btn" {{action (toggle "langOpen" this)}} data-test-toggle-lang><span>{{if this.langOpen "Close" "Expand"}}</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -42,7 +42,7 @@ export default [
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
key: 'default_locale',
|
||||
key: 'lang',
|
||||
value: 'en',
|
||||
group: 'site',
|
||||
created_at: '2013-11-25T14:48:11.000Z',
|
||||
|
Loading…
Reference in New Issue
Block a user