Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
d9c49b75
Commit
d9c49b75
authored
4 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#426
- HTML entities in translated messages
parent
aa6b7324
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/services/internationalisation.service.ts
+6
-5
6 additions, 5 deletions
src/app/services/internationalisation.service.ts
with
6 additions
and
5 deletions
src/app/services/internationalisation.service.ts
+
6
−
5
View file @
d9c49b75
...
...
@@ -119,16 +119,16 @@ export class I18nService extends Observable implements Observer {
return
`*** messages not loaded:
${
this
.
_currentLanguage
}
***`
;
}
if
(
messages
[
textKey
]
!==
undefined
)
{
return
messages
[
textKey
];
return
decodeHtml
(
messages
[
textKey
]
)
;
}
else
{
// try general message
if
(
msg
!==
undefined
&&
this
.
_Messages
[
"
INFO_LIB_
"
+
textKey
.
toUpperCase
()]
!==
undefined
)
{
return
this
.
_Messages
[
"
INFO_LIB_
"
+
textKey
.
toUpperCase
()];
if
(
msg
!==
undefined
&&
this
.
_Messages
[
"
INFO_LIB_
"
+
textKey
.
toUpperCase
()]
!==
undefined
)
{
return
decodeHtml
(
this
.
_Messages
[
"
INFO_LIB_
"
+
textKey
.
toUpperCase
()]
)
;
}
if
(
!
isDevMode
())
{
// try fallback language before giving up
if
(
this
.
_fallbackMessages
[
textKey
]
!==
undefined
)
{
return
this
.
_fallbackMessages
[
textKey
];
return
decodeHtml
(
this
.
_fallbackMessages
[
textKey
]
)
;
}
}
return
`*** message not found:
${
textKey
}
***`
;
...
...
@@ -193,7 +193,8 @@ export class I18nService extends Observable implements Observer {
// replace "FORM_ID_X" by form name in current session, if any
m
=
m
.
replace
(
/FORM_ID_
(\w{6})
/g
,
(
match
,
p1
)
=>
{
const
form
=
ServiceFactory
.
formulaireService
.
getFormulaireFromNubId
(
p1
);
// cannot inject FormulaireService => cyclic dependency :/
// cannot inject FormulaireService => cyclic dependency :/
const
form
=
ServiceFactory
.
formulaireService
.
getFormulaireFromNubId
(
p1
);
let
formName
=
"
**UNKNOWN_FORM**
"
;
if
(
form
!==
undefined
)
{
formName
=
form
.
calculatorName
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment