added translation vars to fields (#7554)

This commit is contained in:
Jay Cammarano
2021-08-23 17:19:51 -04:00
committed by GitHub
parent 72aad59bf9
commit ba8e30ab2e
7 changed files with 166 additions and 74 deletions

View File

@@ -12,48 +12,48 @@ defaults:
data:
- collection: directus_activity
note: Accountability logs for all events
note: $t:directus_collection.directus_activity
- collection: directus_collections
icon: list_alt
note: Additional collection configuration and metadata
note: $t:directus_collection.directus_collections
- collection: directus_fields
icon: input
note: Additional field configuration and metadata
note: $t:directus_collection.directus_fields
- collection: directus_files
icon: folder
note: Metadata for all managed file assets
note: $t:directus_collection.directus_files
display_template: '{{ $thumbnail }} {{ title }}'
- collection: directus_folders
note: Provides virtual directories for files
note: $t:directus_collection.directus_folders
display_template: '{{ name }}'
- collection: directus_migrations
note: What version of the database you're using
note: $t:directus_collection.directus_migrations
- collection: directus_permissions
icon: admin_panel_settings
note: Access permissions for each role
note: $t:directus_collection.directus_permissions
- collection: directus_presets
icon: bookmark_border
note: Presets for collection defaults and bookmarks
note: $t:directus_collection.directus_presets
accountability: null
- collection: directus_relations
icon: merge_type
note: Relationship configuration and metadata
note: $t:directus_collection.directus_relations
- collection: directus_revisions
note: Data snapshots for all activity
note: $t:directus_collection.directus_revisions
- collection: directus_roles
icon: supervised_user_circle
note: Permission groups for system users
note: $t:directus_collection.directus_roles
- collection: directus_sessions
note: User session information
note: $t:directus_collection.directus_sessions
- collection: directus_settings
singleton: true
note: Project configuration options
note: $t:directus_collection.directus_settings
- collection: directus_users
archive_field: status
archive_value: archived
unarchive_value: draft
icon: people_alt
note: System users for the platform
note: $t:directus_collection.directus_users
display_template: '{{ first_name }} {{ last_name }}'
- collection: directus_webhooks
note: Configuration for event-based HTTP requests
note: $t:directus_collection.directus_webhooks

View File

@@ -13,19 +13,19 @@ fields:
defaultForeground: 'var(--foreground-normal)'
defaultBackground: 'var(--background-normal-alt)'
choices:
- text: Create
- text: $t:field_options.directus_activity.Create
value: create
foreground: 'var(--primary)'
background: 'var(--primary-25)'
- text: Update
- text: $t:field_options.directus_activity.Update
value: update
foreground: 'var(--blue)'
background: 'var(--blue-25)'
- text: Delete
- text: $t:field_options.directus_activity.Delete
value: delete
foreground: 'var(--danger)'
background: 'var(--danger-25)'
- text: Login
- text: $t:field_options.directus_activity.Login
value: authenticate
foreground: 'var(--purple)'
background: 'var(--purple-25)'

View File

@@ -8,7 +8,7 @@ fields:
interface: presentation-divider
options:
icon: box
title: Collection Setup
title: $t:field_options.directus_collections.collection_setup
width: full
- field: collection
@@ -32,7 +32,7 @@ fields:
- field: color
interface: select-color
options:
placeholder: Choose a color...
placeholder: $t:field_options.directus_collections.note_placeholder
width: half
- field: display_template
@@ -45,7 +45,7 @@ fields:
special: boolean
interface: boolean
options:
label: Hide within the App
label: $t:field_options.directus_collections.hidden_label
width: half
- field: singleton
@@ -102,7 +102,7 @@ fields:
interface: presentation-divider
options:
icon: archive
title: Archive
title: $t:field_options.directus_collections.archive_divider
width: full
- field: archive_field
@@ -110,14 +110,14 @@ fields:
options:
collectionField: collection
allowNone: true
placeholder: Choose a field...
placeholder: $t:field_options.directus_collections.archive_field
width: half
- field: archive_app_filter
interface: boolean
special: boolean
options:
label: Enable App Archive Filter
label: $t:field_options.directus_collections.archive_app_filter
width: half
- field: archive_value
@@ -125,7 +125,7 @@ fields:
options:
font: monospace
iconRight: archive
placeholder: Value set when archiving...
placeholder: $t:field_options.directus_collections.archive_value
width: half
- field: unarchive_value
@@ -133,7 +133,7 @@ fields:
options:
font: monospace
iconRight: unarchive
placeholder: Value set when unarchiving...
placeholder: $t:field_options.directus_collections.unarchive_value
width: half
- field: sort_divider
@@ -143,14 +143,14 @@ fields:
interface: presentation-divider
options:
icon: sort
title: Sort
title: $t:field_options.directus_collections.divider
width: full
- field: sort_field
interface: system-field
options:
collectionField: collection
placeholder: Choose a field...
placeholder: $t:field_options.directus_collections.sort_field
typeAllowList:
- float
- decimal
@@ -165,7 +165,7 @@ fields:
interface: presentation-divider
options:
icon: admin_panel_settings
title: Accountability
title: $t:field_options.directus_collections.accountability_divider
width: full
- field: accountability

View File

@@ -10,14 +10,14 @@ fields:
interface: input
options:
iconRight: title
placeholder: A unique title...
placeholder: $t:field_options.directus_files.title
width: full
- field: description
interface: input-multiline
width: full
options:
placeholder: An optional description...
placeholder: $t:field_options.directus_files.description
- field: tags
interface: tags
@@ -35,7 +35,7 @@ fields:
interface: input
options:
iconRight: place
placeholder: An optional location...
placeholder: $t:field_options.directus_files.location
width: half
- field: storage
@@ -49,7 +49,7 @@ fields:
interface: presentation-divider
options:
icon: insert_drive_file
title: File Naming
title: $t:field_options.directus_files.storage_divider
special:
- alias
- no-data
@@ -59,7 +59,7 @@ fields:
interface: input
options:
iconRight: publish
placeholder: Name on disk storage...
placeholder: $t:field_options.directus_files.filename_disk
readonly: true
width: half
@@ -67,7 +67,7 @@ fields:
interface: input
options:
iconRight: get_app
placeholder: Name when downloading...
placeholder: $t:field_options.directus_files.filename_download
width: half
- field: metadata

View File

@@ -9,7 +9,7 @@ fields:
- field: name
interface: input
options:
placeholder: The unique name for this role...
placeholder: $t:field_options.directus_roles.name
width: half
- field: icon
@@ -20,7 +20,7 @@ fields:
- field: description
interface: input
options:
placeholder: A description of this role...
placeholder: $t:field_options.directus_roles.description
width: full
- field: app_access
@@ -36,7 +36,7 @@ fields:
- field: ip_access
interface: tags
options:
placeholder: Add allowed IP addresses, leave empty to allow all...
placeholder: $t:field_options.directus_roles.ip_access
special: csv
width: full
@@ -60,13 +60,13 @@ fields:
template: '{{ name }}'
addLabel: Add New Module...
fields:
- name: Icon
- name: $t:field_options.directus_roles.fields.icon_name
field: icon
type: string
meta:
interface: select-icon
width: half
- name: Name
- name: $t:field_options.directus_roles.fields.name_name
field: name
type: string
meta:
@@ -74,8 +74,8 @@ fields:
width: half
options:
iconRight: title
placeholder: Enter a title...
- name: Link
placeholder:
- name: $t:field_options.directus_roles.fields.link_name
field: link
type: string
meta:
@@ -83,7 +83,7 @@ fields:
width: full
options:
iconRight: link
placeholder: Relative or absolute URL...
placeholder: $t:field_options.directus_roles.fields.link_placeholder
special: json
width: full
@@ -91,9 +91,9 @@ fields:
interface: list
options:
template: '{{ group_name }}'
addLabel: Add New Group...
addLabel: $t:field_options.directus_roles.collection_list.group_name_addLabel
fields:
- name: Group Name
- name: $t:field_options.directus_roles.collection_list.fields.group_name
field: group_name
type: string
meta:
@@ -101,10 +101,10 @@ fields:
interface: input
options:
iconRight: title
placeholder: Label this group...
placeholder: $t:field_options.directus_roles.collection_list.fields.group_placeholder
schema:
is_nullable: false
- name: Type
- name: $t:field_options.directus_roles.collection_list.fields.type_name
field: accordion
type: string
schema:
@@ -115,21 +115,21 @@ fields:
options:
choices:
- value: always_open
text: Always Open
text: $t:field_options.directus_roles.collection_list.fields.choices_always
- value: start_open
text: Start Open
text: $t:field_options.directus_roles.collection_list.fields.choices_start_open
- value: start_collapsed
text: Start Collapsed
- name: Collections
text: $t:field_options.directus_roles.collection_list.fields.choices_start_collapsed
- name: $t:field_options.directus_roles.collections_name
field: collections
type: JSON
meta:
interface: list
options:
addLabel: Add New Collection...
addLabel: $t:field_options.directus_roles.collections_addLabel
template: '{{ collection }}'
fields:
- name: Collection
- name: $t:field_options.directus_roles.collections_name
field: collection
type: string
meta:

View File

@@ -8,7 +8,7 @@ fields:
interface: input
options:
iconRight: title
placeholder: My project...
placeholder: $t:field_options.directus_settings.project_name_placeholder
translations:
language: en-US
translations: Name
@@ -26,7 +26,7 @@ fields:
- field: project_color
interface: select-color
note: Login & Logo Background
note: $t:field_options.directus_settings.project_logo_note
translations:
language: en-US
translations: Brand Color
@@ -67,7 +67,7 @@ fields:
- field: public_note
interface: input-multiline
options:
placeholder: A short, public message that supports markdown formatting...
placeholder: $t:field_options.directus_settings.public_note_placeholder
width: full
- field: security_divider
@@ -85,11 +85,11 @@ fields:
options:
choices:
- value: null
text: None  Not Recommended
text: $t:field_options.directus_settings.auth_password_policy.none_text
- value: '/^.{8,}$/'
text: Weak Minimum 8 Characters
text: $t:field_options.directus_settings.auth_password_policy.weak_text
- value: "/(?=^.{8,}$)(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+}{';'?>.<,])(?!.*\\s).*$/"
text: Strong Upper / Lowercase / Numbers / Special
text: $t:field_options.directus_settings.auth_password_policy.strong_text
allowOther: true
width: half
@@ -135,13 +135,13 @@ fields:
options:
choices:
- value: contain
text: Contain (preserve aspect ratio)
text: $t:field_options.directus_settings.storage_asset_presets.fit.contain_text
- value: cover
text: Cover (forces exact size)
text: $t:field_options.directus_settings.storage_asset_presets.fit.cover_text
- value: inside
text: Fit inside
text: $t:field_options.directus_settings.storage_asset_presets.fit.fit_text
- value: outside
text: Fit outside
text: $t:field_options.directus_settings.storage_asset_presets.fit.outside_text
width: half
- field: width
name: $t:width
@@ -181,7 +181,7 @@ fields:
interface: boolean
width: half
options:
label: Don't upscale images
label: $t:no_upscale
- field: format
name: Format
type: string
@@ -203,15 +203,14 @@ fields:
text: Tiff
width: half
- field: transforms
name: Additional Transformations
name: $t:field_options.directus_settings.additional_transforms
type: json
schema:
is_nullable: false
default_value: []
meta:
note:
The Sharp method name and its arguments. See https://sharp.pixelplumbing.com/api-constructor for more
information.
note: $t:field_options.directus_settings.transforms_note
interface: json
options:
template: >
@@ -279,8 +278,8 @@ fields:
interface: input
options:
icon: key
title: Mapbox Access Token
placeholder: pk.eyJ1Ijo.....
title: $t:field_options.directus_settings.mapbox_key
placeholder: $t:field_options.directus_settings.mapbox_placeholder
iconLeft: vpn_key
font: monospace
width: half
@@ -306,11 +305,11 @@ fields:
options:
choices:
- value: raster
text: Raster
text: $t:field_options.directus_settings.basemaps_raster
- value: tile
text: Raster TileJSON
text: $t:field_options.directus_settings.basemaps_tile
- value: style
text: Mapbox Style
text: $t:field_options.directus_settings.basemaps_style
- field: url
name: $t:url
schema:

View File

@@ -819,6 +819,17 @@ fields:
last_page: Last Page
last_access: Last Access
directus_settings:
jpg: JPEG
png: PNG
webP: WebP
tiff: Tiff
basemaps_raster: Raster
basemaps_tile: Raster TileJSON
basemaps_style: Mapbox Style
mapbox_key: Mapbox Access Token
mapbox_placeholder: pk.eyJ1Ijo.....
transforms_note: The Sharp method name and its arguments. See https://sharp.pixelplumbing.com/api-constructor for more information.
additional_transforms: Additional Transformations
project_name: Project Name
project_url: Project URL
project_color: Project Color
@@ -867,6 +878,88 @@ field_options:
track_activity_revisions: Track Activity & Revisions
only_track_activity: Only Track Activity
do_not_track_anything: Do Not Track Anything
collection_setup: Collection Setup
note_placeholder: A description of this collection...
hidden_label: Hide within the App
singleton: Treat as single object
language: Language
translation: Enter a translation...
archive_divider: Archive
archive_field: Choose a field...
archive_app_filter: Enable App Archive Filter
archive_value: Value set when archiving...
unarchive_value: Value set when unarchiving...
divider: Sort
sort_field: Choose a field...
accountability_divider: Accountability
directus_files:
title: A unique title...
description: An optional description...
location: An optional location...
storage_divider: File Naming
filename_disk: Name on disk storage...
filename_download: Name when downloading...
directus_roles:
name: The unique name for this role...
description: A description of this role...
ip_access: Add allowed IP addresses, leave empty to allow all...
fields:
icon_name: Icon
name_name: Name
name_placeholder: Enter a title...
link_name: Link
link_placeholder: Relative or absolute URL...
collection_list:
group_name_addLabel: Add New Group...
fields:
group_name: Group Name
group_placeholder: Label this group...
type_name: Type
choices_always: Always Open
choices_start_open: Start Open
choises_start_collapsed: Start Collapsed
collections_name: Collections
collections_addLabel: addLabel
directus_settings:
project_name_placeholder: My project...
project_color_note: Login & Logo Background
project_logo_note: White 40x40 SVG/PNG
public_divider_title: Public Pages
public_note_placeholder: A short, public message that supports markdown formatting...
security_divider_title: Security
auth_password_policy:
none_text: None  Not Recommended
weak_text: Weak Minimum 8 Characters
strong_text: Strong Upper / Lowercase / Numbers / Special
storage_asset_presets:
fit:
contain_text: Contain (preserve aspect ratio)
cover_text: Cover (forces exact size)
inside_text: Fit inside
outside_text: Fit outside
files_divider_title: Files & Thumbnails
overrides_divider_title: App Overrides
directus_users:
preferences_divider: User Preferences
dropdown_auto: Automatic (Based on System)
dropdown_light: Light Mode
dropdown_dark: Dark Mode
admin_divider: Admin Options
status_dropdown_draft: Draft
status_dropdown_invited: Invited
status_dropdown_active: Active
status_dropdown_suspended: Suspended
status_dropdown_archived: Archived
token: Enter a secure access token...
directus_webhooks:
status_options_active: Active
status_options_inactive: Inactive
data_label: Send Event Data
triggers_divider: Triggers
actions_create: Create
actions_update: Update
actions_delete: Delete
actions_login: Login
no_fields_in_collection: 'There are no fields in "{collection}" yet'
do_nothing: Do Nothing
generate_and_save_uuid: Generate and Save UUID