Removes all cases of naming for filters and metadatum that are translated on admin instead of using their objetct_type.name information from class.

This commit is contained in:
Mateus Machado Luna 2019-10-23 10:16:32 -03:00
parent 2c56e6fad7
commit 044b808019
7 changed files with 9 additions and 36 deletions

View File

@ -74,7 +74,7 @@
{{ metadatum.name }} {{ metadatum.name }}
</span> </span>
<span class="label-details"> <span class="label-details">
({{ $i18n.get(metadatum.metadata_type_object.component) }}) <em>{{ (metadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }}</em> ({{ metadatum.metadata_type_object.name }}) <em>{{ (metadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }}</em>
</span> </span>
</option> </option>
</b-select> </b-select>

View File

@ -115,7 +115,7 @@
<span <span
v-if="metadatum.required == 'yes'" v-if="metadatum.required == 'yes'"
class="required-metadatum-asterisk">*</span> class="required-metadatum-asterisk">*</span>
<span class="metadata-type">({{ $i18n.get(metadatum.metadata_type_object.component) }})</span> <span class="metadata-type">({{ metadatum.metadata_type_object.metadata }})</span>
<help-button <help-button
:title="metadatum.name" :title="metadatum.name"
:message="metadatum.description"/> :message="metadatum.description"/>

View File

@ -96,7 +96,7 @@
<span <span
v-if="filter.filter_type_object != undefined" v-if="filter.filter_type_object != undefined"
class="label-details"> class="label-details">
({{ $i18n.get(filter.filter_type_object.component) }}) ({{ filter.filter_type_object.name }})
<span <span
class="not-saved" class="not-saved"
v-if="(editForms[filter.id] != undefined && editForms[filter.id].saved != true) ||filter.status == 'auto-draft'"> v-if="(editForms[filter.id] != undefined && editForms[filter.id].saved != true) ||filter.status == 'auto-draft'">

View File

@ -98,19 +98,17 @@
{{ metadatum.name }} {{ metadatum.name }}
</span> </span>
<span <span
v-if="metadatum.id != undefined" v-if="metadatum.id != undefined && metadatum.metadata_type_object"
class="label-details"> class="label-details">
({{ $i18n.get(metadatum.metadata_type_object.component) }}) ({{ metadatum.metadata_type_object.name }})
<em v-if="metadatum.collection_id != collectionId">{{ $i18n.get('label_inherited') }}</em> <em v-if="metadatum.collection_id != collectionId">{{ $i18n.get('label_inherited') }}</em>
<em <em
v-if="metadatum.metadata_type_object && v-if="metadatum.metadata_type_object.core &&
metadatum.metadata_type_object.core &&
metadatum.metadata_type_object.related_mapped_prop == 'title'"> metadatum.metadata_type_object.related_mapped_prop == 'title'">
{{ $i18n.get('label_core_title') }} {{ $i18n.get('label_core_title') }}
</em> </em>
<em <em
v-if="metadatum.metadata_type_object && v-if="metadatum.metadata_type_object.core &&
metadatum.metadata_type_object.core &&
metadatum.metadata_type_object.related_mapped_prop == 'description'"> metadatum.metadata_type_object.related_mapped_prop == 'description'">
{{ $i18n.get('label_core_description') }} {{ $i18n.get('label_core_description') }}
</em> </em>

View File

@ -667,31 +667,6 @@ return apply_filters( 'tainacan-admin-i18n', [
'info_final_value' => __( 'Final value', 'tainacan' ), 'info_final_value' => __( 'Final value', 'tainacan' ),
'info_show_interval_on_tag' => __( 'Show applied interval on tags', 'tainacan' ), 'info_show_interval_on_tag' => __( 'Show applied interval on tags', 'tainacan' ),
// Tainacan Metadatum Types
'tainacan-text' => __( 'Text', 'tainacan' ),
'tainacan-textarea' => __( 'Text area', 'tainacan' ),
'tainacan-date' => __( 'Date', 'tainacan' ),
'tainacan-numeric' => __( 'Numeric', 'tainacan' ),
'tainacan-selectbox' => __( 'Select box', 'tainacan' ),
'tainacan-relationship' => __( 'Relationship', 'tainacan' ),
'tainacan-taxonomy' => __( 'Taxonomy', 'tainacan' ),
'tainacan-compound' => __( 'Compound', 'tainacan' ),
// Tainacan Filter Types
'tainacan-filter-custom-interval' => __( 'Custom Interval', 'tainacan' ),
'tainacan-filter-numeric' => __( 'Numeric', 'tainacan' ),
'tainacan-filter-date' => __( 'Date', 'tainacan' ),
'tainacan-filter-selectbox' => __( 'Select Box', 'tainacan' ),
'tainacan-filter-autocomplete' => __( 'Autocomplete', 'tainacan' ),
'tainacan-filter-taginput' => __( 'Tag Input', 'tainacan' ),
'tainacan-filter-checkbox' => __( 'Check Box', 'tainacan' ),
'tainacan-filter-taxonomy-taginput' => __( 'Taxonomy Tag Input', 'tainacan' ),
'tainacan-filter-taxonomy-checkbox' => __( 'Taxonomy Check Box', 'tainacan' ),
'tainacan-filter-taxonomy-selectbox' => __( 'Taxonomy Select Box', 'tainacan' ),
'tainacan-filter-numeric-interval' => __( 'Numeric Interval', 'tainacan' ),
'tainacan-filter-date-interval' => __( 'Date Interval', 'tainacan' ),
'tainacan-filter-numeric-list-interval' => __( 'Numeric Interval List', 'tainacan' ),
// Datepicker months // Datepicker months
'datepicker_month_january' => __( 'January', 'tainacan' ), 'datepicker_month_january' => __( 'January', 'tainacan' ),
'datepicker_month_february' => __( 'February', 'tainacan' ), 'datepicker_month_february' => __( 'February', 'tainacan' ),

View File

@ -19,7 +19,7 @@ class Core_Title extends Metadata_Type {
$this->set_core(true); $this->set_core(true);
$this->set_related_mapped_prop('title'); $this->set_related_mapped_prop('title');
$this->set_component('tainacan-text'); $this->set_component('tainacan-text');
$this->set_name( __('Core Description', 'tainacan') ); $this->set_name( __('Core Title', 'tainacan') );
$this->set_description( __('The "Core Title" is a compulsory metadata automatically created for all collections by default. It is the main metadatum of the item and where the basic research tools will do their searches.', 'tainacan') ); $this->set_description( __('The "Core Title" is a compulsory metadata automatically created for all collections by default. It is the main metadatum of the item and where the basic research tools will do their searches.', 'tainacan') );
} }

View File

@ -28,7 +28,7 @@
v-if="metadatum.metadatum.required == 'yes'" v-if="metadatum.metadatum.required == 'yes'"
class="required-metadatum-asterisk" class="required-metadatum-asterisk"
:class="metadatumTypeMessage">*</span> :class="metadatumTypeMessage">*</span>
<span class="metadata-type">({{ $i18n.get(metadatum.metadatum.metadata_type_object.component) }})</span> <span class="metadata-type">({{ metadatum.metadatum.metadata_type_object.name }})</span>
<help-button <help-button
:title="metadatum.metadatum.name" :title="metadatum.metadatum.name"
:message="metadatum.metadatum.description"/> :message="metadatum.metadatum.description"/>