Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
15e33fa3
Commit
15e33fa3
authored
6 years ago
by
kevin.dezaphi
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #8218 lang
parent
65f62e90
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/frontend/lang/lang-en.ts
+14
-0
14 additions, 0 deletions
src/frontend/lang/lang-en.ts
src/frontend/lang/lang-fr.ts
+14
-0
14 additions, 0 deletions
src/frontend/lang/lang-fr.ts
src/frontend/plugins/timeLimit.pipe.ts
+18
-15
18 additions, 15 deletions
src/frontend/plugins/timeLimit.pipe.ts
with
46 additions
and
15 deletions
src/frontend/lang/lang-en.ts
+
14
−
0
View file @
15e33fa3
...
...
@@ -34,6 +34,7 @@ export const LANG_EN = {
"
application
"
:
"
Application
"
,
"
appUpToDate
"
:
"
Your application is up to date
"
,
"
april
"
:
"
April
"
,
"
aprilShort
"
:
"
Apr.
"
,
"
archivalAgency
"
:
"
Archival agency
"
,
"
archivalAgreement
"
:
"
Archival agreement
"
,
"
arrivalDate
"
:
"
Arrival date
"
,
...
...
@@ -42,6 +43,7 @@ export const LANG_EN = {
"
attachment
"
:
"
Attachment
"
,
"
attachments
"
:
"
Attachments
"
,
"
august
"
:
"
August
"
,
"
augustShort
"
:
"
Aug.
"
,
"
authorize
"
:
"
Authorize
"
,
"
autoLogoutAbsence
"
:
"
You are going to be automaticaly disconnected after your redirections
"
,
"
available
"
:
"
available
"
,
...
...
@@ -96,7 +98,9 @@ export const LANG_EN = {
"
date
"
:
"
Date
"
,
"
day
"
:
"
Day
"
,
"
dayOfMonth
"
:
"
Day of month
"
,
"
dayS
"
:
"
Day(s)
"
,
"
december
"
:
"
December
"
,
"
decemberShort
"
:
"
Dec.
"
,
"
default
"
:
"
default
"
,
"
defaultAction
"
:
"
Default action
"
,
"
delete
"
:
"
Delete
"
,
...
...
@@ -142,6 +146,7 @@ export const LANG_EN = {
"
entityWithoutParentMessage
"
:
"
If you're not a member of this entity, you will automatically become part of it.
"
,
"
export_seda
"
:
"
Seda export
"
,
"
february
"
:
"
February
"
,
"
februaryShort
"
:
"
Feb.
"
,
"
fileplan
"
:
"
Fileplan
"
,
"
filterBy
"
:
"
Filter by
"
,
"
fingerprint
"
:
"
Digital fingerprint
"
,
...
...
@@ -178,8 +183,11 @@ export const LANG_EN = {
"
isSearchBasket
"
:
"
Only search basket
"
,
"
isSytemAction
"
:
"
System action
"
,
"
january
"
:
"
January
"
,
"
januaryShort
"
:
"
Jan.
"
,
"
july
"
:
"
July
"
,
"
julyShort
"
:
"
July
"
,
"
june
"
:
"
June
"
,
"
juneShort
"
:
"
June
"
,
"
keyword
"
:
"
Keyword
"
,
"
keywordHelp
"
:
"
Keyword help
"
,
"
keywordHelpDesc_1
"
:
"
Identifier of logged user
"
,
...
...
@@ -213,7 +221,9 @@ export const LANG_EN = {
"
manageAbsences
"
:
"
Manage absences
"
,
"
manageSignatures
"
:
"
Manage signatures
"
,
"
march
"
:
"
March
"
,
"
marchShort
"
:
"
Mar.
"
,
"
may
"
:
"
May
"
,
"
mayShort
"
:
"
May
"
,
"
maxSize
"
:
"
Maximum size
"
,
"
memberAllUsers
"
:
"
All users member
"
,
"
memberDiffTypeUsers
"
:
"
Diffusion type users member
"
,
...
...
@@ -276,13 +286,16 @@ export const LANG_EN = {
"
notificationUpdated
"
:
"
Notification updated
"
,
"
notUsed
"
:
"
Not used
"
,
"
november
"
:
"
November
"
,
"
novemberShort
"
:
"
Nov.
"
,
"
object
"
:
"
Object
"
,
"
october
"
:
"
October
"
,
"
octoberShort
"
:
"
Oct.
"
,
"
optional
"
:
"
Optional
"
,
"
others
"
:
"
Other(s)
"
,
"
otherActions
"
:
"
Other(s) action(s)
"
,
"
otherInformations
"
:
"
Other(s) information(s)
"
,
"
otherParameters
"
:
"
Other(s) parameter(s)
"
,
"
outdated
"
:
"
Outdated
"
,
"
outOf
"
:
"
of
"
,
"
page
"
:
"
Page
"
,
"
parameter
"
:
"
Parameter
"
,
...
...
@@ -338,6 +351,7 @@ export const LANG_EN = {
"
saturday
"
:
"
Saturday
"
,
"
save
"
:
"
Save
"
,
"
september
"
:
"
September
"
,
"
septemberShort
"
:
"
Sept.
"
,
"
sbSignatures
"
:
"
Signature Book Signatures
"
,
"
script
"
:
"
Script
"
,
"
scriptCreated
"
:
"
Script created
"
,
...
...
This diff is collapsed.
Click to expand it.
src/frontend/lang/lang-fr.ts
+
14
−
0
View file @
15e33fa3
...
...
@@ -41,6 +41,7 @@ export const LANG_FR = {
"
application
"
:
"
Application
"
,
"
appUpToDate
"
:
"
Votre application est à jour
"
,
"
april
"
:
"
Avril
"
,
"
aprilShort
"
:
"
Avr.
"
,
"
archival
"
:
"
Archivage
"
,
"
archivalAgency
"
:
"
Convention d'archivage
"
,
"
archivalAgreement
"
:
"
Service d'archive
"
,
...
...
@@ -50,6 +51,7 @@ export const LANG_FR = {
"
attachment
"
:
"
Pièce jointe
"
,
"
attachments
"
:
"
Pièces jointes
"
,
"
august
"
:
"
Août
"
,
"
augustShort
"
:
"
Août
"
,
"
authorize
"
:
"
Autoriser
"
,
"
autoLogoutAbsence
"
:
"
Vous allez être automatiquement déconnecté après avoir défini vos redirections de bannettes
"
,
"
available
"
:
"
disponible
"
,
...
...
@@ -119,7 +121,9 @@ export const LANG_FR = {
"
date
"
:
"
Date
"
,
"
day
"
:
"
Jour
"
,
"
dayOfMonth
"
:
"
Jour du mois
"
,
"
dayS
"
:
"
Jour(s)
"
,
"
december
"
:
"
Décembre
"
,
"
decemberShort
"
:
"
Déc.
"
,
"
default
"
:
"
par défaut
"
,
"
defaultAction
"
:
"
Action par défaut
"
,
"
defaultPriority
"
:
"
Priorité par défaut
"
,
...
...
@@ -191,6 +195,7 @@ export const LANG_FR = {
"
event
"
:
"
Événement
"
,
"
export_seda
"
:
"
Export seda
"
,
"
february
"
:
"
Février
"
,
"
februaryShort
"
:
"
Fév.
"
,
"
field
"
:
"
Champ
"
,
"
fieldNature
"
:
"
Nature champ
"
,
"
fieldType
"
:
"
Type champ
"
,
...
...
@@ -241,8 +246,11 @@ export const LANG_FR = {
"
isSearchBasket
"
:
"
Bannette de recherche uniquement
"
,
"
isSytemAction
"
:
"
Action système
"
,
"
january
"
:
"
Janvier
"
,
"
januaryShort
"
:
"
Jan.
"
,
"
july
"
:
"
Juillet
"
,
"
julyShort
"
:
"
Juil.
"
,
"
june
"
:
"
Juin
"
,
"
juneShort
"
:
"
Juin
"
,
"
keyword
"
:
"
Mot-clé
"
,
"
keywordHelp
"
:
"
Aide sur les mots-clés
"
,
"
keywordHelpDesc_1
"
:
"
Identifiant de l'utilisateur connecté
"
,
...
...
@@ -280,7 +288,9 @@ export const LANG_FR = {
"
manageSignatures
"
:
"
Gérer les signatures
"
,
"
mandatory
"
:
"
Obligatoire
"
,
"
march
"
:
"
Mars
"
,
"
marchShort
"
:
"
Mars
"
,
"
may
"
:
"
Mai
"
,
"
mayShort
"
:
"
Mai
"
,
"
maxSize
"
:
"
Taille maximale
"
,
"
memberAllUsers
"
:
"
Tout les utilisateurs membres
"
,
"
memberDiffTypeUsers
"
:
"
Personnes membres du type de diffusion
"
,
...
...
@@ -349,14 +359,17 @@ export const LANG_FR = {
"
notUsed
"
:
"
Non utilisé
"
,
"
noUserReplacement
"
:
"
Aucun utilisateur de remplacement
"
,
"
november
"
:
"
Novembre
"
,
"
novemberShort
"
:
"
Nov.
"
,
"
numericPackageImported
"
:
"
Pli numérique correctement importé
"
,
"
object
"
:
"
Objet
"
,
"
october
"
:
"
Octobre
"
,
"
octoberShort
"
:
"
Oct.
"
,
"
optional
"
:
"
Optionnel
"
,
"
otherActions
"
:
"
Action(s) supplémentaire(s)
"
,
"
otherInformations
"
:
"
Information(s) complémentaire(s)
"
,
"
otherParameters
"
:
"
Autre(s) paramètre(s)
"
,
"
others
"
:
"
Autre(s)
"
,
"
outdated
"
:
"
Dépassée
"
,
"
outOf
"
:
"
sur
"
,
"
page
"
:
"
Page
"
,
"
parameter
"
:
"
Paramètre
"
,
...
...
@@ -440,6 +453,7 @@ export const LANG_FR = {
"
sendmail
"
:
"
Envoi de courriels
"
,
"
sendTo
"
:
"
Envoyer à
"
,
"
september
"
:
"
Septembre
"
,
"
septemberShort
"
:
"
Sept.
"
,
"
shortLabel
"
:
"
Libellé court
"
,
"
signAdded
"
:
"
Signature ajoutée
"
,
"
signatureAdded
"
:
"
Signature ajoutée
"
,
...
...
This diff is collapsed.
Click to expand it.
src/frontend/plugins/timeLimit.pipe.ts
+
18
−
15
View file @
15e33fa3
import
{
Pipe
,
PipeTransform
,
NgZone
,
ChangeDetectorRef
,
OnDestroy
}
from
"
@angular/core
"
;
import
{
LANG
}
from
'
../app/translate.component
'
;
@
Pipe
({
name
:
'
timeLimit
'
,
pure
:
false
})
export
class
TimeLimitPipe
implements
PipeTransform
,
OnDestroy
{
private
timer
:
number
;
lang
:
any
=
LANG
;
constructor
(
private
changeDetectorRef
:
ChangeDetectorRef
,
private
ngZone
:
NgZone
)
{}
transform
(
value
:
string
)
{
this
.
removeTimer
();
...
...
@@ -15,18 +18,18 @@ export class TimeLimitPipe implements PipeTransform, OnDestroy {
let
minuteNumber
=
(
'
0
'
+
d
.
getMinutes
()).
slice
(
-
2
)
let
now
=
new
Date
();
let
month
=
new
Array
();
month
[
0
]
=
"
Jan.
"
;
month
[
1
]
=
"
Fév.
"
;
month
[
2
]
=
"
Mars
"
;
month
[
3
]
=
"
Avr.
"
;
month
[
4
]
=
"
Mai
"
;
month
[
5
]
=
"
Juin
"
;
month
[
6
]
=
"
Juil.
"
;
month
[
7
]
=
"
Août
"
;
month
[
8
]
=
"
Sept.
"
;
month
[
9
]
=
"
Oct.
"
;
month
[
10
]
=
"
Nov.
"
;
month
[
11
]
=
"
Déc.
"
;
month
[
0
]
=
this
.
lang
.
januaryShort
;
month
[
1
]
=
this
.
lang
.
februaryShort
;
month
[
2
]
=
this
.
lang
.
marchShort
;
month
[
3
]
=
this
.
lang
.
aprilShort
;
month
[
4
]
=
this
.
lang
.
mayShort
;
month
[
5
]
=
this
.
lang
.
juneShort
;
month
[
6
]
=
this
.
lang
.
julyShort
;
month
[
7
]
=
this
.
lang
.
augustShort
;
month
[
8
]
=
this
.
lang
.
septemberShort
;
month
[
9
]
=
this
.
lang
.
octoberShort
;
month
[
10
]
=
this
.
lang
.
novemberShort
;
month
[
11
]
=
this
.
lang
.
decemberShort
;
let
seconds
=
Math
.
round
(
Math
.
abs
((
now
.
getTime
()
-
d
.
getTime
())
/
1000
));
let
timeToUpdate
=
(
Number
.
isNaN
(
seconds
))
?
1000
:
this
.
getSecondsUntilUpdate
(
seconds
)
*
1000
;
this
.
timer
=
this
.
ngZone
.
runOutsideAngular
(()
=>
{
...
...
@@ -43,14 +46,14 @@ export class TimeLimitPipe implements PipeTransform, OnDestroy {
let
months
=
Math
.
round
(
Math
.
abs
(
days
/
30.416
));
let
years
=
Math
.
round
(
Math
.
abs
(
days
/
365
));
if
(
now
>
d
)
{
return
'
<span class="timeDanger" color="warn">
dépassée
!</span>
'
;
return
'
<span class="timeDanger" color="warn">
'
+
this
.
lang
.
outdated
+
'
!</span>
'
;
}
else
{
if
(
Number
.
isNaN
(
seconds
)){
return
''
;
}
else
if
(
days
<=
3
)
{
return
'
<span color="warn">
'
+
days
+
'
jour(s)
'
+
'
</span>
'
;
return
'
<span color="warn">
'
+
days
+
'
'
+
this
.
lang
.
dayS
+
'
</span>
'
;
}
else
if
(
days
<=
7
)
{
return
'
<span class="timeWarn">
'
+
days
+
'
jour(s)
'
+
'
</span>
'
;
return
'
<span class="timeWarn">
'
+
days
+
'
'
+
this
.
lang
.
dayS
+
'
</span>
'
;
}
else
if
(
days
<=
345
)
{
return
'
<span color="accent">
'
+
d
.
getDate
()
+
'
'
+
month
[
d
.
getMonth
()]
+
'
</span>
'
;
}
else
if
(
days
<=
545
)
{
...
...
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