Commit d31c0d1a authored by Jacques Erasmus's avatar Jacques Erasmus

Merge branch 'cngo-update-locale-paths' into 'master'

Use `~/` alias for locale imports

See merge request gitlab-org/gitlab!84000
parents 1676c94f c93eab30
import { parseBoolean } from '../lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
import { n__ } from '../locale'; import { n__ } from '~/locale';
export default class SecretValues { export default class SecretValues {
constructor({ constructor({
......
import Vue from 'vue'; import Vue from 'vue';
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '../locale'; import { __ } from '~/locale';
import DivergenceGraph from './components/divergence_graph.vue'; import DivergenceGraph from './components/divergence_graph.vue';
export function createGraphVueApp(el, data, maxCommits, defaultBranch) { export function createGraphVueApp(el, data, maxCommits, defaultBranch) {
......
import $ from 'jquery'; import $ from 'jquery';
import SecretValues from '../behaviors/secret_values'; import SecretValues from '~/behaviors/secret_values';
import CreateItemDropdown from '../create_item_dropdown'; import CreateItemDropdown from '~/create_item_dropdown';
import { parseBoolean } from '../lib/utils/common_utils'; import { parseBoolean } from '~/lib/utils/common_utils';
import { s__ } from '../locale'; import { s__ } from '~/locale';
const ALL_ENVIRONMENTS_STRING = s__('CiVariable|All environments'); const ALL_ENVIRONMENTS_STRING = s__('CiVariable|All environments');
......
...@@ -4,10 +4,10 @@ import Vue from 'vue'; ...@@ -4,10 +4,10 @@ import Vue from 'vue';
import createFlash from '~/flash'; import createFlash from '~/flash';
import AccessorUtilities from '~/lib/utils/accessor'; import AccessorUtilities from '~/lib/utils/accessor';
import initProjectSelectDropdown from '~/project_select'; import initProjectSelectDropdown from '~/project_select';
import Poll from '../lib/utils/poll'; import Poll from '~/lib/utils/poll';
import { s__ } from '../locale'; import { s__ } from '~/locale';
import PersistentUserCallout from '../persistent_user_callout'; import PersistentUserCallout from '~/persistent_user_callout';
import initSettingsPanels from '../settings_panels'; import initSettingsPanels from '~/settings_panels';
import RemoveClusterConfirmation from './components/remove_cluster_confirmation.vue'; import RemoveClusterConfirmation from './components/remove_cluster_confirmation.vue';
import ClustersService from './services/clusters_service'; import ClustersService from './services/clusters_service';
import ClustersStore from './stores/clusters_store'; import ClustersStore from './stores/clusters_store';
......
<script> <script>
import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui'; import { GlIcon, GlLink, GlSprintf } from '@gitlab/ui';
import createFlash from '~/flash'; import createFlash from '~/flash';
import Api from '../../api'; import Api from '~/api';
import { __ } from '../../locale'; import { __ } from '~/locale';
import state from '../state'; import state from '../state';
import Dropdown from './dropdown.vue'; import Dropdown from './dropdown.vue';
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
import { isEqual, isFunction, omitBy } from 'lodash'; import { isEqual, isFunction, omitBy } from 'lodash';
import Visibility from 'visibilityjs'; import Visibility from 'visibilityjs';
import createFlash from '~/flash'; import createFlash from '~/flash';
import Poll from '../../lib/utils/poll'; import Poll from '~/lib/utils/poll';
import { getParameterByName } from '../../lib/utils/url_utility'; import { getParameterByName } from '~/lib/utils/url_utility';
import { s__, __ } from '../../locale'; import { s__, __ } from '~/locale';
import tabs from '../../vue_shared/components/navigation_tabs.vue'; import tabs from '~/vue_shared/components/navigation_tabs.vue';
import tablePagination from '../../vue_shared/components/pagination/table_pagination.vue'; import tablePagination from '~/vue_shared/components/pagination/table_pagination.vue';
import container from '../components/container.vue'; import container from '../components/container.vue';
import environmentTable from '../components/environments_table.vue'; import environmentTable from '../components/environments_table.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
......
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '../locale'; import { __ } from '~/locale';
export const getSelector = (highlightId) => `.js-feature-highlight[data-highlight=${highlightId}]`; export const getSelector = (highlightId) => `.js-feature-highlight[data-highlight=${highlightId}]`;
......
<script> <script>
import { GlIcon } from '@gitlab/ui'; import { GlIcon } from '@gitlab/ui';
import { n__ } from '../../locale'; import { n__ } from '~/locale';
import { MAX_CHILDREN_COUNT } from '../constants'; import { MAX_CHILDREN_COUNT } from '../constants';
export default { export default {
......
import { __, s__ } from '../locale'; import { __, s__ } from '~/locale';
export const MAX_CHILDREN_COUNT = 20; export const MAX_CHILDREN_COUNT = 20;
......
<script> <script>
import { GlIcon, GlPopover } from '@gitlab/ui'; import { GlIcon, GlPopover } from '@gitlab/ui';
import { __, sprintf } from '../../../locale'; import { __, sprintf } from '~/locale';
import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants'; import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants';
export default { export default {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlTooltipDirective, GlButton, GlIcon, GlSafeHtmlDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlButton, GlIcon, GlSafeHtmlDirective } from '@gitlab/ui';
import { throttle } from 'lodash'; import { throttle } from 'lodash';
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { __ } from '../../../locale'; import { __ } from '~/locale';
import JobDescription from './detail/description.vue'; import JobDescription from './detail/description.vue';
import ScrollButton from './detail/scroll_button.vue'; import ScrollButton from './detail/scroll_button.vue';
......
<script> <script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '../../../../locale'; import { __ } from '~/locale';
const directions = { const directions = {
up: 'up', up: 'up',
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
WEBIDE_MARK_FETCH_FILES_START, WEBIDE_MARK_FETCH_FILES_START,
} from '~/performance/constants'; } from '~/performance/constants';
import { performanceMarkAndMeasure } from '~/performance/utils'; import { performanceMarkAndMeasure } from '~/performance/utils';
import { __ } from '../../../locale'; import { __ } from '~/locale';
import { decorateFiles } from '../../lib/files'; import { decorateFiles } from '../../lib/files';
import service from '../../services'; import service from '../../services';
import * as types from '../mutation_types'; import * as types from '../mutation_types';
......
import { __ } from '../../../../locale'; import { __ } from '~/locale';
import { COMMIT_TO_NEW_BRANCH } from './constants'; import { COMMIT_TO_NEW_BRANCH } from './constants';
const BRANCH_SUFFIX_COUNT = 5; const BRANCH_SUFFIX_COUNT = 5;
......
import Api from '../../../../api'; import Api from '~/api';
import { __ } from '../../../../locale'; import { __ } from '~/locale';
import { scopes } from './constants'; import { scopes } from './constants';
import * as types from './mutation_types'; import * as types from './mutation_types';
......
import axios from 'axios'; import axios from 'axios';
import Visibility from 'visibilityjs'; import Visibility from 'visibilityjs';
import httpStatus from '../../../../lib/utils/http_status'; import httpStatus from '~/lib/utils/http_status';
import Poll from '../../../../lib/utils/poll'; import Poll from '~/lib/utils/poll';
import { __ } from '../../../../locale'; import { __ } from '~/locale';
import { rightSidebarViews } from '../../../constants'; import { rightSidebarViews } from '../../../constants';
import service from '../../../services'; import service from '../../../services';
import * as types from './mutation_types'; import * as types from './mutation_types';
......
import { __ } from '../locale'; import { __ } from '~/locale';
// The `scheduling` status is only present on the client-side, // The `scheduling` status is only present on the client-side,
// it is used as the status when we are requesting to start an import. // it is used as the status when we are requesting to start an import.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { GlSprintf, GlLink } from '@gitlab/ui'; import { GlSprintf, GlLink } from '@gitlab/ui';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
import CiIcon from '~/vue_shared/components/ci_icon.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue';
import { __ } from '../../locale'; import { __ } from '~/locale';
export default { export default {
creatingEnvironment: 'creating', creatingEnvironment: 'creating',
......
import { isNumber } from 'lodash'; import { isNumber } from 'lodash';
import { __, n__ } from '../../../locale'; import { __, n__ } from '~/locale';
import { getDayName, parseSeconds } from './date_format_utility'; import { getDayName, parseSeconds } from './date_format_utility';
const DAYS_IN_WEEK = 7; const DAYS_IN_WEEK = 7;
......
...@@ -2,7 +2,7 @@ import dateFormat from 'dateformat'; ...@@ -2,7 +2,7 @@ import dateFormat from 'dateformat';
import { isString, mapValues, reduce, isDate, unescape } from 'lodash'; import { isString, mapValues, reduce, isDate, unescape } from 'lodash';
import { roundToNearestHalf } from '~/lib/utils/common_utils'; import { roundToNearestHalf } from '~/lib/utils/common_utils';
import { sanitize } from '~/lib/dompurify'; import { sanitize } from '~/lib/dompurify';
import { s__, n__, __, sprintf } from '../../../locale'; import { s__, n__, __, sprintf } from '~/locale';
/** /**
* Returns i18n month names array. * Returns i18n month names array.
......
import * as timeago from 'timeago.js'; import * as timeago from 'timeago.js';
import { languageCode, s__, createDateTimeFormat } from '../../../locale'; import { languageCode, s__, createDateTimeFormat } from '~/locale';
import { formatDate } from './date_format_utility'; import { formatDate } from './date_format_utility';
/** /**
......
...@@ -2,8 +2,8 @@ import * as Sentry from '@sentry/browser'; ...@@ -2,8 +2,8 @@ import * as Sentry from '@sentry/browser';
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { convertToFixedRange } from '~/lib/utils/datetime_range'; import { convertToFixedRange } from '~/lib/utils/datetime_range';
import { convertObjectPropsToCamelCase } from '../../lib/utils/common_utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import { s__, sprintf } from '../../locale'; import { s__, sprintf } from '~/locale';
import { ENVIRONMENT_AVAILABLE_STATE, OVERVIEW_DASHBOARD_PATH, VARIABLE_TYPES } from '../constants'; import { ENVIRONMENT_AVAILABLE_STATE, OVERVIEW_DASHBOARD_PATH, VARIABLE_TYPES } from '../constants';
import trackDashboardLoad from '../monitoring_tracking_helper'; import trackDashboardLoad from '../monitoring_tracking_helper';
import getAnnotations from '../queries/get_annotations.query.graphql'; import getAnnotations from '../queries/get_annotations.query.graphql';
......
/* eslint-disable func-names, consistent-return */ /* eslint-disable func-names, consistent-return */
import $ from 'jquery'; import $ from 'jquery';
import axios from '../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '../locale'; import { __ } from '~/locale';
import Raphael from './raphael'; import Raphael from './raphael';
export default class BranchGraph { export default class BranchGraph {
......
...@@ -10,8 +10,8 @@ import httpStatusCodes from '~/lib/utils/http_status'; ...@@ -10,8 +10,8 @@ import httpStatusCodes from '~/lib/utils/http_status';
import { ignoreWhilePending } from '~/lib/utils/ignore_while_pending'; import { ignoreWhilePending } from '~/lib/utils/ignore_while_pending';
import { truncateSha } from '~/lib/utils/text_utility'; import { truncateSha } from '~/lib/utils/text_utility';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import { __, s__, sprintf } from '../../locale'; import { __, s__, sprintf } from '~/locale';
import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import userAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
import noteable from '../mixins/noteable'; import noteable from '../mixins/noteable';
import resolvable from '../mixins/resolvable'; import resolvable from '../mixins/resolvable';
......
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '../../../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '../../../locale'; import { __ } from '~/locale';
export default class PayloadDownloader { export default class PayloadDownloader {
constructor(trigger) { constructor(trigger) {
......
import createFlash from '~/flash'; import createFlash from '~/flash';
import axios from '../../../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { __ } from '../../../locale'; import { __ } from '~/locale';
export default class PayloadPreviewer { export default class PayloadPreviewer {
constructor(trigger) { constructor(trigger) {
......
import { __, sprintf } from '../../../locale'; import { __, sprintf } from '~/locale';
import { TestStatus } from '../../constants'; import { TestStatus } from '../../constants';
/** /**
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
} from '@gitlab/ui'; } from '@gitlab/ui';
import permissionsQuery from 'shared_queries/repository/permissions.query.graphql'; import permissionsQuery from 'shared_queries/repository/permissions.query.graphql';
import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility'; import { joinPaths, escapeFileUrl } from '~/lib/utils/url_utility';
import { __ } from '../../locale'; import { __ } from '~/locale';
import getRefMixin from '../mixins/get_ref'; import getRefMixin from '../mixins/get_ref';
import projectPathQuery from '../queries/project_path.query.graphql'; import projectPathQuery from '../queries/project_path.query.graphql';
import projectShortPathQuery from '../queries/project_short_path.query.graphql'; import projectShortPathQuery from '../queries/project_short_path.query.graphql';
......
<script> <script>
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlButton } from '@gitlab/ui'; import { GlDeprecatedSkeletonLoading as GlSkeletonLoading, GlButton } from '@gitlab/ui';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; 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 getRefMixin from '../../mixins/get_ref';
import projectPathQuery from '../../queries/project_path.query.graphql'; import projectPathQuery from '../../queries/project_path.query.graphql';
import TableHeader from './header.vue'; import TableHeader from './header.vue';
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql'; import paginatedTreeQuery from 'shared_queries/repository/paginated_tree.query.graphql';
import createFlash from '~/flash'; import createFlash from '~/flash';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { __ } from '../../locale'; import { __ } from '~/locale';
import { import {
TREE_PAGE_SIZE, TREE_PAGE_SIZE,
TREE_INITIAL_FETCH_COUNT, TREE_INITIAL_FETCH_COUNT,
......
<script> <script>
import { GlButton, GlLink } from '@gitlab/ui'; import { GlButton, GlLink } from '@gitlab/ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { s__ } from '../../locale'; import { s__ } from '~/locale';
export default { export default {
components: { components: {
......
...@@ -3,7 +3,7 @@ import { GlButton } from '@gitlab/ui'; ...@@ -3,7 +3,7 @@ import { GlButton } from '@gitlab/ui';
import $ from 'jquery'; import $ from 'jquery';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { __, sprintf } from '../../../locale'; import { __, sprintf } from '~/locale';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
export default { export default {
......
<script> <script>
import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui'; import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui';
import { joinPaths } from '~/lib/utils/url_utility'; import { joinPaths } from '~/lib/utils/url_utility';
import { sprintf, s__ } from '../../../locale'; import { sprintf, s__ } from '~/locale';
export default { export default {
name: 'TimeTrackingHelpState', name: 'TimeTrackingHelpState',
......
...@@ -11,10 +11,10 @@ import { ...@@ -11,10 +11,10 @@ import {
import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown'; import initDeprecatedJQueryDropdown from '~/deprecated_jquery_dropdown';
import { isUserBusy } from '~/set_status_modal/utils'; import { isUserBusy } from '~/set_status_modal/utils';
import { fixTitle, dispose } from '~/tooltips'; import { fixTitle, dispose } from '~/tooltips';
import axios from '../lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { parseBoolean, spriteIcon } from '../lib/utils/common_utils'; import { parseBoolean, spriteIcon } from '~/lib/utils/common_utils';
import { loadCSSFile } from '../lib/utils/css_utils'; import { loadCSSFile } from '~/lib/utils/css_utils';
import { s__, __, sprintf } from '../locale'; import { s__, __, sprintf } from '~/locale';
import { getAjaxUsersSelectOptions, getAjaxUsersSelectParams } from './utils'; import { getAjaxUsersSelectOptions, getAjaxUsersSelectParams } from './utils';
// TODO: remove eventHub hack after code splitting refactor // TODO: remove eventHub hack after code splitting refactor
......
<script> <script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import { __ } from '../../locale'; import { __ } from '~/locale';
export default { export default {
i18n: { i18n: {
......
...@@ -8,8 +8,8 @@ import { ...@@ -8,8 +8,8 @@ import {
GlTooltip, GlTooltip,
} from '@gitlab/ui'; } from '@gitlab/ui';
import { isGid, getIdFromGraphQLId } from '~/graphql_shared/utils'; import { isGid, getIdFromGraphQLId } from '~/graphql_shared/utils';
import { glEmojiTag } from '../../emoji'; import { glEmojiTag } from '~/emoji';
import { __, sprintf } from '../../locale'; import { __, sprintf } from '~/locale';
import CiIconBadge from './ci_badge_link.vue'; import CiIconBadge from './ci_badge_link.vue';
import TimeagoTooltip from './time_ago_tooltip.vue'; import TimeagoTooltip from './time_ago_tooltip.vue';
......
import { __, n__, s__, sprintf } from '../locale'; import { __, n__, s__, sprintf } from '~/locale';
export default (Vue) => { export default (Vue) => {
Vue.mixin({ Vue.mixin({
......
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