mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
add composable wrapper for phrasen mixin
This commit is contained in:
@@ -44,6 +44,24 @@ function getValueForLoadedPhrase(category, phrase, params) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// Composable (wrapper for mixin)
|
||||
export function usePhrasen() {
|
||||
|
||||
function t_ref(category, phrase, params) {
|
||||
return phrasen.t_ref(category, phrase, params);
|
||||
}
|
||||
|
||||
function t(category, phrase, params) {
|
||||
return phrasen.t(category, phrase, params);
|
||||
}
|
||||
|
||||
return {
|
||||
t_ref,
|
||||
t,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const phrasen = {
|
||||
t_ref(category, phrase, params) {
|
||||
if (params === undefined && (
|
||||
|
||||
Reference in New Issue
Block a user