From c93eab308eca3236806fa2b57cbc38eac7cf41fc Mon Sep 17 00:00:00 2001 From: Coung Ngo <cngo@gitlab.com> Date: Wed, 30 Mar 2022 18:25:58 +0100 Subject: [PATCH] Use `~/` alias for locale imports Use alias for better readability --- app/assets/javascripts/behaviors/secret_values.js | 4 ++-- app/assets/javascripts/branches/divergence_graph.js | 4 ++-- .../javascripts/ci_variable_list/ci_variable_list.js | 8 ++++---- app/assets/javascripts/clusters/clusters_bundle.js | 8 ++++---- .../components/project_form_group.vue | 4 ++-- .../environments/mixins/environments_mixin.js | 10 +++++----- .../feature_highlight/feature_highlight_helper.js | 4 ++-- .../javascripts/groups/components/group_folder.vue | 2 +- app/assets/javascripts/groups/constants.js | 2 +- .../ide/components/commit_sidebar/message_field.vue | 2 +- app/assets/javascripts/ide/components/jobs/detail.vue | 2 +- .../ide/components/jobs/detail/scroll_button.vue | 2 +- app/assets/javascripts/ide/stores/actions/tree.js | 2 +- .../javascripts/ide/stores/modules/commit/getters.js | 2 +- .../ide/stores/modules/merge_requests/actions.js | 4 ++-- .../ide/stores/modules/pipelines/actions.js | 6 +++--- app/assets/javascripts/import_entities/constants.js | 2 +- .../javascripts/jobs/components/environments_block.vue | 2 +- .../lib/utils/datetime/date_calculation_utility.js | 2 +- .../lib/utils/datetime/date_format_utility.js | 2 +- .../javascripts/lib/utils/datetime/timeago_utility.js | 2 +- app/assets/javascripts/monitoring/stores/actions.js | 4 ++-- app/assets/javascripts/network/branch_graph.js | 4 ++-- .../javascripts/notes/components/noteable_note.vue | 4 ++-- .../admin/application_settings/payload_downloader.js | 4 ++-- .../admin/application_settings/payload_previewer.js | 4 ++-- .../javascripts/pipelines/stores/test_reports/utils.js | 2 +- .../javascripts/repository/components/breadcrumbs.vue | 2 +- .../javascripts/repository/components/table/index.vue | 2 +- .../javascripts/repository/components/tree_content.vue | 2 +- .../serverless/components/missing_prometheus.vue | 2 +- .../sidebar/components/lock/edit_form_buttons.vue | 2 +- .../sidebar/components/time_tracking/help_state.vue | 2 +- app/assets/javascripts/users_select/index.js | 8 ++++---- .../components/source_branch_removal_status.vue | 2 +- .../vue_shared/components/header_ci_component.vue | 4 ++-- app/assets/javascripts/vue_shared/translate.js | 2 +- 37 files changed, 63 insertions(+), 63 deletions(-) diff --git a/app/assets/javascripts/behaviors/secret_values.js b/app/assets/javascripts/behaviors/secret_values.js index a34d5dcaef84..b6ed14611cd1 100644 --- a/app/assets/javascripts/behaviors/secret_values.js +++ b/app/assets/javascripts/behaviors/secret_values.js @@ -1,5 +1,5 @@ -import { parseBoolean } from '../lib/utils/common_utils'; -import { n__ } from '../locale'; +import { parseBoolean } from '~/lib/utils/common_utils'; +import { n__ } from '~/locale'; export default class SecretValues { constructor({ diff --git a/app/assets/javascripts/branches/divergence_graph.js b/app/assets/javascripts/branches/divergence_graph.js index 31cf9a18077d..17fd39394416 100644 --- a/app/assets/javascripts/branches/divergence_graph.js +++ b/app/assets/javascripts/branches/divergence_graph.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import createFlash from '~/flash'; -import axios from '../lib/utils/axios_utils'; -import { __ } from '../locale'; +import axios from '~/lib/utils/axios_utils'; +import { __ } from '~/locale'; import DivergenceGraph from './components/divergence_graph.vue'; export function createGraphVueApp(el, data, maxCommits, defaultBranch) { diff --git a/app/assets/javascripts/ci_variable_list/ci_variable_list.js b/app/assets/javascripts/ci_variable_list/ci_variable_list.js index 055e2f83e33b..574a5e7fd99d 100644 --- a/app/assets/javascripts/ci_variable_list/ci_variable_list.js +++ b/app/assets/javascripts/ci_variable_list/ci_variable_list.js @@ -1,8 +1,8 @@ import $ from 'jquery'; -import SecretValues from '../behaviors/secret_values'; -import CreateItemDropdown from '../create_item_dropdown'; -import { parseBoolean } from '../lib/utils/common_utils'; -import { s__ } from '../locale'; +import SecretValues from '~/behaviors/secret_values'; +import CreateItemDropdown from '~/create_item_dropdown'; +import { parseBoolean } from '~/lib/utils/common_utils'; +import { s__ } from '~/locale'; const ALL_ENVIRONMENTS_STRING = s__('CiVariable|All environments'); diff --git a/app/assets/javascripts/clusters/clusters_bundle.js b/app/assets/javascripts/clusters/clusters_bundle.js index 8dcab55ac61e..a8fef3726379 100644 --- a/app/assets/javascripts/clusters/clusters_bundle.js +++ b/app/assets/javascripts/clusters/clusters_bundle.js @@ -4,10 +4,10 @@ import Vue from 'vue'; import createFlash from '~/flash'; import AccessorUtilities from '~/lib/utils/accessor'; import initProjectSelectDropdown from '~/project_select'; -import Poll from '../lib/utils/poll'; -import { s__ } from '../locale'; -import PersistentUserCallout from '../persistent_user_callout'; -import initSettingsPanels from '../settings_panels'; +import Poll from '~/lib/utils/poll'; +import { s__ } from '~/locale'; +import PersistentUserCallout from '~/persistent_user_callout'; +import initSettingsPanels from '~/settings_panels'; import RemoveClusterConfirmation from './components/remove_cluster_confirmation.vue'; import ClustersService from './services/clusters_service'; import ClustersStore from './stores/clusters_store'; diff --git a/app/assets/javascripts/confidential_merge_request/components/project_form_group.vue b/app/assets/javascripts/confidential_merge_request/components/project_form_group.vue index 590661629602..622fd1e381a0 100644 --- a/app/assets/javascripts/confidential_merge_request/components/project_form_group.vue +++ b/app/assets/javascripts/confidential_merge_request/components/project_form_group.vue @@ -1,8 +1,8 @@ <script> import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui'; import createFlash from '~/flash'; -import Api from '../../api'; -import { __ } from '../../locale'; +import Api from '~/api'; +import { __ } from '~/locale'; import state from '../state'; import Dropdown from './dropdown.vue'; diff --git a/app/assets/javascripts/environments/mixins/environments_mixin.js b/app/assets/javascripts/environments/mixins/environments_mixin.js index 0f9741784d61..8957a3074ede 100644 --- a/app/assets/javascripts/environments/mixins/environments_mixin.js +++ b/app/assets/javascripts/environments/mixins/environments_mixin.js @@ -4,11 +4,11 @@ import { isEqual, isFunction, omitBy } from 'lodash'; import Visibility from 'visibilityjs'; import createFlash from '~/flash'; -import Poll from '../../lib/utils/poll'; -import { getParameterByName } from '../../lib/utils/url_utility'; -import { s__, __ } from '../../locale'; -import tabs from '../../vue_shared/components/navigation_tabs.vue'; -import tablePagination from '../../vue_shared/components/pagination/table_pagination.vue'; +import Poll from '~/lib/utils/poll'; +import { getParameterByName } from '~/lib/utils/url_utility'; +import { s__, __ } from '~/locale'; +import tabs from '~/vue_shared/components/navigation_tabs.vue'; +import tablePagination from '~/vue_shared/components/pagination/table_pagination.vue'; import container from '../components/container.vue'; import environmentTable from '../components/environments_table.vue'; import eventHub from '../event_hub'; diff --git a/app/assets/javascripts/feature_highlight/feature_highlight_helper.js b/app/assets/javascripts/feature_highlight/feature_highlight_helper.js index 747f368b6714..b26a96499ba6 100644 --- a/app/assets/javascripts/feature_highlight/feature_highlight_helper.js +++ b/app/assets/javascripts/feature_highlight/feature_highlight_helper.js @@ -1,6 +1,6 @@ import createFlash from '~/flash'; -import axios from '../lib/utils/axios_utils'; -import { __ } from '../locale'; +import axios from '~/lib/utils/axios_utils'; +import { __ } from '~/locale'; export const getSelector = (highlightId) => `.js-feature-highlight[data-highlight=${highlightId}]`; diff --git a/app/assets/javascripts/groups/components/group_folder.vue b/app/assets/javascripts/groups/components/group_folder.vue index 5f169832ee4d..042d818338a6 100644 --- a/app/assets/javascripts/groups/components/group_folder.vue +++ b/app/assets/javascripts/groups/components/group_folder.vue @@ -1,6 +1,6 @@ <script> import { GlIcon } from '@gitlab/ui'; -import { n__ } from '../../locale'; +import { n__ } from '~/locale'; import { MAX_CHILDREN_COUNT } from '../constants'; export default { diff --git a/app/assets/javascripts/groups/constants.js b/app/assets/javascripts/groups/constants.js index 005bac1e7b5c..cacba2dfd235 100644 --- a/app/assets/javascripts/groups/constants.js +++ b/app/assets/javascripts/groups/constants.js @@ -1,4 +1,4 @@ -import { __, s__ } from '../locale'; +import { __, s__ } from '~/locale'; export const MAX_CHILDREN_COUNT = 20; diff --git a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue index 8f0e5aef4564..2799ea1378e8 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue @@ -1,6 +1,6 @@ <script> import { GlIcon, GlPopover } from '@gitlab/ui'; -import { __, sprintf } from '../../../locale'; +import { __, sprintf } from '~/locale'; import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants'; export default { diff --git a/app/assets/javascripts/ide/components/jobs/detail.vue b/app/assets/javascripts/ide/components/jobs/detail.vue index 55ae5501cdb4..8d6a0b99e0c1 100644 --- a/app/assets/javascripts/ide/components/jobs/detail.vue +++ b/app/assets/javascripts/ide/components/jobs/detail.vue @@ -2,7 +2,7 @@ import { GlTooltipDirective, GlButton, GlIcon, GlSafeHtmlDirective } from '@gitlab/ui'; import { throttle } from 'lodash'; import { mapActions, mapState } from 'vuex'; -import { __ } from '../../../locale'; +import { __ } from '~/locale'; import JobDescription from './detail/description.vue'; import ScrollButton from './detail/scroll_button.vue'; diff --git a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue index 6e1929a1948b..bcbc68421c29 100644 --- a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue +++ b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue @@ -1,6 +1,6 @@ <script> import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; -import { __ } from '../../../../locale'; +import { __ } from '~/locale'; const directions = { up: 'up', diff --git a/app/assets/javascripts/ide/stores/actions/tree.js b/app/assets/javascripts/ide/stores/actions/tree.js index f46d3cbe9466..20d8dc3381d1 100644 --- a/app/assets/javascripts/ide/stores/actions/tree.js +++ b/app/assets/javascripts/ide/stores/actions/tree.js @@ -5,7 +5,7 @@ import { WEBIDE_MARK_FETCH_FILES_START, } from '~/performance/constants'; import { performanceMarkAndMeasure } from '~/performance/utils'; -import { __ } from '../../../locale'; +import { __ } from '~/locale'; import { decorateFiles } from '../../lib/files'; import service from '../../services'; import * as types from '../mutation_types'; diff --git a/app/assets/javascripts/ide/stores/modules/commit/getters.js b/app/assets/javascripts/ide/stores/modules/commit/getters.js index 05e3601f3815..0e7254e67bed 100644 --- a/app/assets/javascripts/ide/stores/modules/commit/getters.js +++ b/app/assets/javascripts/ide/stores/modules/commit/getters.js @@ -1,4 +1,4 @@ -import { __ } from '../../../../locale'; +import { __ } from '~/locale'; import { COMMIT_TO_NEW_BRANCH } from './constants'; const BRANCH_SUFFIX_COUNT = 5; diff --git a/app/assets/javascripts/ide/stores/modules/merge_requests/actions.js b/app/assets/javascripts/ide/stores/modules/merge_requests/actions.js index 8446b93d14a6..3408245b245d 100644 --- a/app/assets/javascripts/ide/stores/modules/merge_requests/actions.js +++ b/app/assets/javascripts/ide/stores/modules/merge_requests/actions.js @@ -1,5 +1,5 @@ -import Api from '../../../../api'; -import { __ } from '../../../../locale'; +import Api from '~/api'; +import { __ } from '~/locale'; import { scopes } from './constants'; import * as types from './mutation_types'; diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js index 51872993f16b..62476b7fc639 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/actions.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/actions.js @@ -1,8 +1,8 @@ import axios from 'axios'; import Visibility from 'visibilityjs'; -import httpStatus from '../../../../lib/utils/http_status'; -import Poll from '../../../../lib/utils/poll'; -import { __ } from '../../../../locale'; +import httpStatus from '~/lib/utils/http_status'; +import Poll from '~/lib/utils/poll'; +import { __ } from '~/locale'; import { rightSidebarViews } from '../../../constants'; import service from '../../../services'; import * as types from './mutation_types'; diff --git a/app/assets/javascripts/import_entities/constants.js b/app/assets/javascripts/import_entities/constants.js index 156e92e2d00e..1ab5413a5cc2 100644 --- a/app/assets/javascripts/import_entities/constants.js +++ b/app/assets/javascripts/import_entities/constants.js @@ -1,4 +1,4 @@ -import { __ } from '../locale'; +import { __ } from '~/locale'; // The `scheduling` status is only present on the client-side, // it is used as the status when we are requesting to start an import. diff --git a/app/assets/javascripts/jobs/components/environments_block.vue b/app/assets/javascripts/jobs/components/environments_block.vue index 9d451f94e8a2..da72cbeb8562 100644 --- a/app/assets/javascripts/jobs/components/environments_block.vue +++ b/app/assets/javascripts/jobs/components/environments_block.vue @@ -2,7 +2,7 @@ import { GlSprintf, GlLink } from '@gitlab/ui'; import { isEmpty } from 'lodash'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; -import { __ } from '../../locale'; +import { __ } from '~/locale'; export default { creatingEnvironment: 'creating', diff --git a/app/assets/javascripts/lib/utils/datetime/date_calculation_utility.js b/app/assets/javascripts/lib/utils/datetime/date_calculation_utility.js index 8dbadbe4bfc4..4e7086e62c5d 100644 --- a/app/assets/javascripts/lib/utils/datetime/date_calculation_utility.js +++ b/app/assets/javascripts/lib/utils/datetime/date_calculation_utility.js @@ -1,5 +1,5 @@ import { isNumber } from 'lodash'; -import { __, n__ } from '../../../locale'; +import { __, n__ } from '~/locale'; import { getDayName, parseSeconds } from './date_format_utility'; const DAYS_IN_WEEK = 7; diff --git a/app/assets/javascripts/lib/utils/datetime/date_format_utility.js b/app/assets/javascripts/lib/utils/datetime/date_format_utility.js index 8b048cd51dd3..830f46043826 100644 --- a/app/assets/javascripts/lib/utils/datetime/date_format_utility.js +++ b/app/assets/javascripts/lib/utils/datetime/date_format_utility.js @@ -2,7 +2,7 @@ import dateFormat from 'dateformat'; import { isString, mapValues, reduce, isDate, unescape } from 'lodash'; import { roundToNearestHalf } from '~/lib/utils/common_utils'; import { sanitize } from '~/lib/dompurify'; -import { s__, n__, __, sprintf } from '../../../locale'; +import { s__, n__, __, sprintf } from '~/locale'; /** * Returns i18n month names array. diff --git a/app/assets/javascripts/lib/utils/datetime/timeago_utility.js b/app/assets/javascripts/lib/utils/datetime/timeago_utility.js index 2b898d8b6a51..095a29a2effb 100644 --- a/app/assets/javascripts/lib/utils/datetime/timeago_utility.js +++ b/app/assets/javascripts/lib/utils/datetime/timeago_utility.js @@ -1,5 +1,5 @@ import * as timeago from 'timeago.js'; -import { languageCode, s__, createDateTimeFormat } from '../../../locale'; +import { languageCode, s__, createDateTimeFormat } from '~/locale'; import { formatDate } from './date_format_utility'; /** diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js index 7b9680aece12..5c99dbc0d982 100644 --- a/app/assets/javascripts/monitoring/stores/actions.js +++ b/app/assets/javascripts/monitoring/stores/actions.js @@ -2,8 +2,8 @@ import * as Sentry from '@sentry/browser'; import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { convertToFixedRange } from '~/lib/utils/datetime_range'; -import { convertObjectPropsToCamelCase } from '../../lib/utils/common_utils'; -import { s__, sprintf } from '../../locale'; +import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; +import { s__, sprintf } from '~/locale'; import { ENVIRONMENT_AVAILABLE_STATE, OVERVIEW_DASHBOARD_PATH, VARIABLE_TYPES } from '../constants'; import trackDashboardLoad from '../monitoring_tracking_helper'; import getAnnotations from '../queries/get_annotations.query.graphql'; diff --git a/app/assets/javascripts/network/branch_graph.js b/app/assets/javascripts/network/branch_graph.js index 71894b4ff3ea..5ae68d22667f 100644 --- a/app/assets/javascripts/network/branch_graph.js +++ b/app/assets/javascripts/network/branch_graph.js @@ -1,8 +1,8 @@ /* eslint-disable func-names, consistent-return */ import $ from 'jquery'; -import axios from '../lib/utils/axios_utils'; -import { __ } from '../locale'; +import axios from '~/lib/utils/axios_utils'; +import { __ } from '~/locale'; import Raphael from './raphael'; export default class BranchGraph { diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index a271ac91f6ee..5b0d581f026c 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -10,8 +10,8 @@ import httpStatusCodes from '~/lib/utils/http_status'; import { ignoreWhilePending } from '~/lib/utils/ignore_while_pending'; import { truncateSha } from '~/lib/utils/text_utility'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; -import { __, s__, sprintf } from '../../locale'; -import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; +import { __, s__, sprintf } from '~/locale'; +import userAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import eventHub from '../event_hub'; import noteable from '../mixins/noteable'; import resolvable from '../mixins/resolvable'; diff --git a/app/assets/javascripts/pages/admin/application_settings/payload_downloader.js b/app/assets/javascripts/pages/admin/application_settings/payload_downloader.js index 67eee2c3209b..7c81cf80dc68 100644 --- a/app/assets/javascripts/pages/admin/application_settings/payload_downloader.js +++ b/app/assets/javascripts/pages/admin/application_settings/payload_downloader.js @@ -1,6 +1,6 @@ import createFlash from '~/flash'; -import axios from '../../../lib/utils/axios_utils'; -import { __ } from '../../../locale'; +import axios from '~/lib/utils/axios_utils'; +import { __ } from '~/locale'; export default class PayloadDownloader { constructor(trigger) { diff --git a/app/assets/javascripts/pages/admin/application_settings/payload_previewer.js b/app/assets/javascripts/pages/admin/application_settings/payload_previewer.js index c017cf0afa2c..ae08806fe4ca 100644 --- a/app/assets/javascripts/pages/admin/application_settings/payload_previewer.js +++ b/app/assets/javascripts/pages/admin/application_settings/payload_previewer.js @@ -1,6 +1,6 @@ import createFlash from '~/flash'; -import axios from '../../../lib/utils/axios_utils'; -import { __ } from '../../../locale'; +import axios from '~/lib/utils/axios_utils'; +import { __ } from '~/locale'; export default class PayloadPreviewer { constructor(trigger) { diff --git a/app/assets/javascripts/pipelines/stores/test_reports/utils.js b/app/assets/javascripts/pipelines/stores/test_reports/utils.js index 63a587989589..6b616601bc52 100644 --- a/app/assets/javascripts/pipelines/stores/test_reports/utils.js +++ b/app/assets/javascripts/pipelines/stores/test_reports/utils.js @@ -1,4 +1,4 @@ -import { __, sprintf } from '../../../locale'; +import { __, sprintf } from '~/locale'; import { TestStatus } from '../../constants'; /** diff --git a/app/assets/javascripts/repository/components/breadcrumbs.vue b/app/assets/javascripts/repository/components/breadcrumbs.vue index bc9f82d985bb..84c9f9d0bbed 100644 --- a/app/assets/javascripts/repository/components/breadcrumbs.vue +++ b/app/assets/javascripts/repository/components/breadcrumbs.vue @@ -9,7 +9,7 @@ import { } from '@gitlab/ui'; import permissionsQuery from 'shared_queries/repository/permissions.query.graphql'; import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility'; -import { __ } from '../../locale'; +import { __ } from '~/locale'; import getRefMixin from '../mixins/get_ref'; import projectPathQuery from '../queries/project_path.query.graphql'; import projectShortPathQuery from '../queries/project_short_path.query.graphql'; diff --git a/app/assets/javascripts/repository/components/table/index.vue b/app/assets/javascripts/repository/components/table/index.vue index 0a2ed753e38f..c2323d6b286f 100644 --- a/app/assets/javascripts/repository/components/table/index.vue +++ b/app/assets/javascripts/repository/components/table/index.vue @@ -1,7 +1,7 @@ <script> import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlButton } from '@gitlab/ui'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { sprintf, __ } from '../../../locale'; +import { sprintf, __ } from '~/locale'; import getRefMixin from '../../mixins/get_ref'; import projectPathQuery from '../../queries/project_path.query.graphql'; import TableHeader from './header.vue'; diff --git a/app/assets/javascripts/repository/components/tree_content.vue b/app/assets/javascripts/repository/components/tree_content.vue index 130ebf773619..2200e999c751 100644 --- a/app/assets/javascripts/repository/components/tree_content.vue +++ b/app/assets/javascripts/repository/components/tree_content.vue @@ -2,7 +2,7 @@ import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql'; import createFlash from '~/flash'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { __ } from '../../locale'; +import { __ } from '~/locale'; import { TREE_PAGE_SIZE, TREE_INITIAL_FETCH_COUNT, diff --git a/app/assets/javascripts/serverless/components/missing_prometheus.vue b/app/assets/javascripts/serverless/components/missing_prometheus.vue index 0023c64e3e43..d9e6bb5009e3 100644 --- a/app/assets/javascripts/serverless/components/missing_prometheus.vue +++ b/app/assets/javascripts/serverless/components/missing_prometheus.vue @@ -1,7 +1,7 @@ <script> import { GlButton, GlLink } from '@gitlab/ui'; import { mapState } from 'vuex'; -import { s__ } from '../../locale'; +import { s__ } from '~/locale'; export default { components: { diff --git a/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue b/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue index 42d2e456a074..2ab46a7a655f 100644 --- a/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue +++ b/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue @@ -3,7 +3,7 @@ import { GlButton } from '@gitlab/ui'; import $ from 'jquery'; import { mapActions } from 'vuex'; import createFlash from '~/flash'; -import { __, sprintf } from '../../../locale'; +import { __, sprintf } from '~/locale'; import eventHub from '../../event_hub'; export default { diff --git a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue index bb90ef8e4444..91c15061fb9c 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue @@ -1,7 +1,7 @@ <script> import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui'; import { joinPaths } from '~/lib/utils/url_utility'; -import { sprintf, s__ } from '../../../locale'; +import { sprintf, s__ } from '~/locale'; export default { name: 'TimeTrackingHelpState', diff --git a/app/assets/javascripts/users_select/index.js b/app/assets/javascripts/users_select/index.js index 656c851aa3d3..777c314fa1c8 100644 --- a/app/assets/javascripts/users_select/index.js +++ b/app/assets/javascripts/users_select/index.js @@ -11,10 +11,10 @@ import { import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; import { isUserBusy } from '~/set_status_modal/utils'; import { fixTitle, dispose } from '~/tooltips'; -import axios from '../lib/utils/axios_utils'; -import { parseBoolean, spriteIcon } from '../lib/utils/common_utils'; -import { loadCSSFile } from '../lib/utils/css_utils'; -import { s__, __, sprintf } from '../locale'; +import axios from '~/lib/utils/axios_utils'; +import { parseBoolean, spriteIcon } from '~/lib/utils/common_utils'; +import { loadCSSFile } from '~/lib/utils/css_utils'; +import { s__, __, sprintf } from '~/locale'; import { getAjaxUsersSelectOptions, getAjaxUsersSelectParams } from './utils'; // TODO: remove eventHub hack after code splitting refactor diff --git a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue index caafd6b995e2..e86724d133a3 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue @@ -1,6 +1,6 @@ <script> import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; -import { __ } from '../../locale'; +import { __ } from '~/locale'; export default { i18n: { diff --git a/app/assets/javascripts/vue_shared/components/header_ci_component.vue b/app/assets/javascripts/vue_shared/components/header_ci_component.vue index 9bff469b6701..2622bdfb8cb0 100644 --- a/app/assets/javascripts/vue_shared/components/header_ci_component.vue +++ b/app/assets/javascripts/vue_shared/components/header_ci_component.vue @@ -8,8 +8,8 @@ import { GlTooltip, } from '@gitlab/ui'; import { isGid, getIdFromGraphQLId } from '~/graphql_shared/utils'; -import { glEmojiTag } from '../../emoji'; -import { __, sprintf } from '../../locale'; +import { glEmojiTag } from '~/emoji'; +import { __, sprintf } from '~/locale'; import CiIconBadge from './ci_badge_link.vue'; import TimeagoTooltip from './time_ago_tooltip.vue'; diff --git a/app/assets/javascripts/vue_shared/translate.js b/app/assets/javascripts/vue_shared/translate.js index 616848639f1c..bc1f88652617 100644 --- a/app/assets/javascripts/vue_shared/translate.js +++ b/app/assets/javascripts/vue_shared/translate.js @@ -1,4 +1,4 @@ -import { __, n__, s__, sprintf } from '../locale'; +import { __, n__, s__, sprintf } from '~/locale'; export default (Vue) => { Vue.mixin({ -- GitLab