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
da692738
Commit
da692738
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Adaptation to
jalhyd#199
parent
6cbb9c10
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/util.ts
+17
-11
17 additions, 11 deletions
src/app/util.ts
src/locale/messages.en.json
+2
-1
2 additions, 1 deletion
src/locale/messages.en.json
src/locale/messages.fr.json
+2
-1
2 additions, 1 deletion
src/locale/messages.fr.json
with
21 additions
and
13 deletions
src/app/util.ts
+
17
−
11
View file @
da692738
import
{
NgParameter
}
from
"
./formulaire/elements/ngparam
"
;
import
{
ServiceFactory
}
from
"
./services/service-factory
"
;
import
{
formattedValue
}
from
"
jalhyd
"
;
import
{
formattedValue
,
Nub
,
ParamDefinition
,
ParamValues
}
from
"
jalhyd
"
;
export
function
logObject
(
obj
:
{},
m
?:
string
)
{
// évite le message "Value below was evaluated just now" dans le debugger de Chrome
...
...
@@ -48,20 +48,26 @@ export function decodeHtml(html: string): string {
* @param varParams
*/
export
function
longestVarParam
(
varParams
:
NgParameter
[]):
{
param
:
NgParameter
,
index
:
number
,
size
:
number
}
{
let
i
=
0
;
let
longest
=
0
;
let
size
=
0
;
for
(
const
v
of
varParams
)
{
const
s
=
v
.
valuesIterator
.
count
();
if
(
s
>
size
)
{
size
=
s
;
longest
=
i
;
const
variated
:
{
param
:
ParamDefinition
,
values
:
ParamValues
}[]
=
[];
for
(
const
vp
of
varParams
)
{
variated
.
push
({
param
:
vp
.
paramDefinition
,
values
:
vp
.
paramDefinition
.
paramValues
});
}
const
{
size
,
longest
,
minLinkedResultParam
}
=
Nub
.
findVariatedSize
(
variated
);
let
realSize
=
size
;
// if at least one linked variated result was found
if
(
minLinkedResultParam
!==
undefined
)
{
// if the size limited by linked variated results is shorter
// than the size of the longest variating element, limit it
if
(
minLinkedResultParam
.
values
.
valuesIterator
.
count
()
<
realSize
)
{
realSize
=
minLinkedResultParam
.
values
.
valuesIterator
.
count
();
}
i
++
;
}
return
{
param
:
varParams
[
longest
],
index
:
longest
,
size
:
s
ize
size
:
realS
ize
};
}
This diff is collapsed.
Click to expand it.
src/locale/messages.en.json
+
2
−
1
View file @
da692738
...
...
@@ -510,5 +510,6 @@
"WARNING_SECTION_OVERFLOW"
:
"Overflow: water elevation exceeds embankment elevation"
,
"WARNING_SECTION_OVERFLOW_ABSC"
:
"Overflow: water elevation exceeds embankment elevation between abscissae %xa% et %xb%"
,
"WARNING_SESSION_LOAD_NOTES_MERGED"
:
"Notes have been merged"
,
"WARNING_VALUE_ROUNDED_TO_INTEGER"
:
"Value of %symbol% was rounded to %rounded%"
"WARNING_VALUE_ROUNDED_TO_INTEGER"
:
"Value of %symbol% was rounded to %rounded%"
,
"WARNING_VARIATED_LENGTH_LIMITED_BY_LINKED_RESULT"
:
"Number of results is limited by linked result %symbol%"
}
This diff is collapsed.
Click to expand it.
src/locale/messages.fr.json
+
2
−
1
View file @
da692738
...
...
@@ -509,5 +509,6 @@
"WARNING_SECTION_OVERFLOW"
:
"Débordement: la cote de l'eau dépasse la cote de berge"
,
"WARNING_SECTION_OVERFLOW_ABSC"
:
"Débordement: la cote de l'eau dépasse la cote de berge entre les abscisses %xa% et %xb%"
,
"WARNING_SESSION_LOAD_NOTES_MERGED"
:
"Les notes ont été fusionnées"
,
"WARNING_VALUE_ROUNDED_TO_INTEGER"
:
"La valeur de %symbol% a été arrondie à %rounded%"
"WARNING_VALUE_ROUNDED_TO_INTEGER"
:
"La valeur de %symbol% a été arrondie à %rounded%"
,
"WARNING_VARIATED_LENGTH_LIMITED_BY_LINKED_RESULT"
:
"Le nombre de résultats est limité par le résultat lié %symbol%"
}
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