Commit 3a3f4a34 authored by Dennis Tang's avatar Dennis Tang

avoid reuse of translation method

parent 08cb13a5
...@@ -18,7 +18,7 @@ export const setMachineType = ({ commit }, selectedMachineType) => { ...@@ -18,7 +18,7 @@ export const setMachineType = ({ commit }, selectedMachineType) => {
const displayError = (resp, errorMessage) => { const displayError = (resp, errorMessage) => {
if (resp.result && resp.result.error) { if (resp.result && resp.result.error) {
Flash(sprintf(s__(errorMessage), { error: resp.result.error.message })); Flash(sprintf(errorMessage, { error: resp.result.error.message }));
} }
}; };
...@@ -49,8 +49,9 @@ export const getProjects = ({ commit }) => ...@@ -49,8 +49,9 @@ export const getProjects = ({ commit }) =>
commit, commit,
mutation: types.SET_PROJECTS, mutation: types.SET_PROJECTS,
payloadKey: 'projects', payloadKey: 'projects',
errorMessage: errorMessage: s__(
'ClusterIntegration|An error occured while trying to fetch your projects: %{error}', 'ClusterIntegration|An error occured while trying to fetch your projects: %{error}',
),
}); });
export const getZones = ({ commit, state }) => export const getZones = ({ commit, state }) =>
...@@ -62,8 +63,9 @@ export const getZones = ({ commit, state }) => ...@@ -62,8 +63,9 @@ export const getZones = ({ commit, state }) =>
commit, commit,
mutation: types.SET_ZONES, mutation: types.SET_ZONES,
payloadKey: 'items', payloadKey: 'items',
errorMessage: errorMessage: s__(
'ClusterIntegration|An error occured while trying to fetch project zones: %{error}', 'ClusterIntegration|An error occured while trying to fetch project zones: %{error}',
),
}); });
export const getMachineTypes = ({ commit, state }) => export const getMachineTypes = ({ commit, state }) =>
...@@ -76,8 +78,9 @@ export const getMachineTypes = ({ commit, state }) => ...@@ -76,8 +78,9 @@ export const getMachineTypes = ({ commit, state }) =>
commit, commit,
mutation: types.SET_MACHINE_TYPES, mutation: types.SET_MACHINE_TYPES,
payloadKey: 'items', payloadKey: 'items',
errorMessage: errorMessage: s__(
'ClusterIntegration|An error occured while trying to fetch zone machine types: %{error}', 'ClusterIntegration|An error occured while trying to fetch zone machine types: %{error}',
),
}); });
// prevent babel-plugin-rewire from generating an invalid default during karma tests // prevent babel-plugin-rewire from generating an invalid default during karma tests
......
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