Commit 465394d1 authored by mfluharty's avatar mfluharty

Translate strings, change other to generic

Mark messages for translation
Rename otherError to genericError
parent 2cf330bf
import { __ } from '~/locale';
import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants'; import { DEFAULT_DEBOUNCE_AND_THROTTLE_MS } from '~/lib/utils/constants';
export const VARIABLE_TYPE = 'env_var'; export const VARIABLE_TYPE = 'env_var';
...@@ -7,5 +8,7 @@ export const CONFIG_VARIABLES_TIMEOUT = 5000; ...@@ -7,5 +8,7 @@ export const CONFIG_VARIABLES_TIMEOUT = 5000;
export const BRANCH_REF_TYPE = 'branch'; export const BRANCH_REF_TYPE = 'branch';
export const TAG_REF_TYPE = 'tag'; export const TAG_REF_TYPE = 'tag';
export const CC_VALIDATION_REQUIRED_ERROR = // must match pipeline/chain/validate/after_config.rb
'Credit card required to be on file in order to create a pipeline'; export const CC_VALIDATION_REQUIRED_ERROR = __(
'Credit card required to be on file in order to create a pipeline',
);
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
ccRequiredError() { ccRequiredError() {
return this.errorMessage === CC_VALIDATION_REQUIRED_ERROR && !this.ccAlertDismissed; return this.errorMessage === CC_VALIDATION_REQUIRED_ERROR && !this.ccAlertDismissed;
}, },
otherError() { genericError() {
return ( return (
this.errorMessage && this.errorMessage &&
this.errorMessage !== CC_VALIDATION_REQUIRED_ERROR && this.errorMessage !== CC_VALIDATION_REQUIRED_ERROR &&
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
@dismiss="ccAlertDismissed = true" @dismiss="ccAlertDismissed = true"
/> />
<gl-alert v-if="otherError" class="gl-mb-3" variant="danger" :dismissible="false"> <gl-alert v-if="genericError" class="gl-mb-3" variant="danger" :dismissible="false">
{{ errorMessage }} {{ errorMessage }}
</gl-alert> </gl-alert>
......
import { __ } from '~/locale';
export const LEVEL_TYPES = { export const LEVEL_TYPES = {
ROLE: 'role', ROLE: 'role',
USER: 'user', USER: 'user',
...@@ -20,5 +22,6 @@ export const ACCESS_LEVELS = { ...@@ -20,5 +22,6 @@ export const ACCESS_LEVELS = {
export const ACCESS_LEVEL_NONE = 0; export const ACCESS_LEVEL_NONE = 0;
// must match shared_runners_setting in update_service.rb // must match shared_runners_setting in update_service.rb
export const CC_VALIDATION_REQUIRED_ERROR = export const CC_VALIDATION_REQUIRED_ERROR = __(
'Shared runners enabled cannot be enabled until a valid credit card is on file'; 'Shared runners enabled cannot be enabled until a valid credit card is on file',
);
...@@ -10447,6 +10447,9 @@ msgstr "" ...@@ -10447,6 +10447,9 @@ msgstr ""
msgid "CredentialsInventory|SSH Keys" msgid "CredentialsInventory|SSH Keys"
msgstr "" msgstr ""
msgid "Credit card required to be on file in order to create a pipeline"
msgstr ""
msgid "Credit card:" msgid "Credit card:"
msgstr "" msgstr ""
...@@ -33045,6 +33048,9 @@ msgstr "" ...@@ -33045,6 +33048,9 @@ msgstr ""
msgid "Shared runners details" msgid "Shared runners details"
msgstr "" msgstr ""
msgid "Shared runners enabled cannot be enabled until a valid credit card is on file"
msgstr ""
msgid "Shared runners help link" msgid "Shared runners help link"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment