forked from opengoofy/hippo4j
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The 'Thread Pool Management' module completes internationalization (o…
…pengoofy#1013) * feat: Run the report module to change internationalization * fix: Internationalize the tenant management page * fix: Internationalize the tenant management page * feat: Continue to refine the 'internationalization' configuration file * feat: The 'Tenant Management' module has been translated * feat: Complete the text translation of the 'Project management' module * feat: The 'Thread Pool Management' module completes internationalization * feat: The 'Thread Pool Management' module completes internationalization Co-authored-by: 冯建军 <[email protected]>
- Loading branch information
1 parent
966eb85
commit 4bd1bb3
Showing
8 changed files
with
206 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Vue from 'vue' | ||
import i18n from '@/locale' | ||
|
||
|
||
/** | ||
* @param langMap {[lang]: any} object | ||
* @param [defaultText] any | ||
* @returns any | ||
*/ | ||
export function langMatch(langMap, defaultText = undefined) { | ||
if (Object.prototype.toString.call(langMap) !== '[object Object]') { | ||
throw Error('The first argument to the langMatch method must be the object type') | ||
} | ||
const lang = i18n.locale | ||
return Object.prototype.hasOwnProperty.call(langMap, lang) ? langMap[lang] : defaultText | ||
} | ||
|
||
|
||
Vue.prototype.$langMatch = langMatch | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.