Skip to content

Commit 62988bc

Browse files
mathis-marcotteMathis Marcotte
and
Mathis Marcotte
authored
added message for required validation (#289)
Co-authored-by: Mathis Marcotte <[email protected]>
1 parent 396614d commit 62988bc

File tree

4 files changed

+68
-39
lines changed

4 files changed

+68
-39
lines changed

frontend/jupyter/i18n/fr/messages.fr.xlf

+32-20
Original file line numberDiff line numberDiff line change
@@ -796,20 +796,28 @@
796796
<context context-type="linenumber">114</context>
797797
</context-group>
798798
</trans-unit>
799+
<trans-unit id="8679122523698617738" datatype="html">
800+
<source>Custom image is required</source>
801+
<target>L'image personnalisée est obligatoire</target>
802+
<context-group purpose="location">
803+
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
804+
<context context-type="linenumber">81</context>
805+
</context-group>
806+
</trans-unit>
799807
<trans-unit id="6343667331017090565" datatype="html">
800808
<source><x id="PH" equiv-text="urlBeginning"/> is not allowed in URLs</source>
801809
<target><x id="PH" equiv-text="urlBeginning"/> n'est pas permis dans les URLs</target>
802810
<context-group purpose="location">
803811
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
804-
<context context-type="linenumber">88</context>
812+
<context context-type="linenumber">91</context>
805813
</context-group>
806814
</trans-unit>
807815
<trans-unit id="7769611021004782223" datatype="html">
808816
<source>This workspace type is disabled for profile &quot;<x id="PH" equiv-text="this.nsMetadata.metadata.name"/>&quot;.</source>
809817
<target>Cet espace de travail est désactivé pour le profile &quot;<x id="PH" equiv-text="this.nsMetadata.metadata.name"/>&quot;.</target>
810818
<context-group purpose="location">
811819
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
812-
<context context-type="linenumber">153</context>
820+
<context context-type="linenumber">156</context>
813821
</context-group>
814822
<context-group purpose="location">
815823
<context context-type="sourcefile">src/app/pages/form/form-new/form-image/form-image.component.ts</context>
@@ -877,7 +885,7 @@
877885
<target>Aucune classe de stockage par défaut n'est définie. Impossible de créer un nouveau disque pour le nouveau bloc-notes. Veuillez utiliser un disque existant.</target>
878886
<context-group purpose="location">
879887
<context context-type="sourcefile">src/app/pages/form/form-new/form-new.component.ts</context>
880-
<context context-type="linenumber">82</context>
888+
<context context-type="linenumber">85</context>
881889
</context-group>
882890
</trans-unit>
883891
<trans-unit id="e9eddff13e07404962037056840f5dc5568a9cc5" datatype="html">
@@ -964,12 +972,24 @@
964972
<context context-type="linenumber">44</context>
965973
</context-group>
966974
</trans-unit>
975+
<trans-unit id="3833692663709091545" datatype="html">
976+
<source>Name is required</source>
977+
<target>Nom est obligatoire</target>
978+
<context-group purpose="location">
979+
<context context-type="sourcefile">src/app/pages/form/form-new/volume/existing/pvc/pvc.component.ts</context>
980+
<context context-type="linenumber">64</context>
981+
</context-group>
982+
<context-group purpose="location">
983+
<context context-type="sourcefile">src/app/pages/form/form-new/volume/new/name/name.component.ts</context>
984+
<context context-type="linenumber">128</context>
985+
</context-group>
986+
</trans-unit>
967987
<trans-unit id="8731812673197724196" datatype="html">
968988
<source>Is mounted</source>
969989
<target>Est monté</target>
970990
<context-group purpose="location">
971991
<context context-type="sourcefile">src/app/pages/form/form-new/volume/existing/pvc/pvc.component.ts</context>
972-
<context context-type="linenumber">64</context>
992+
<context context-type="linenumber">67</context>
973993
</context-group>
974994
</trans-unit>
975995
<trans-unit id="623533293782016444" datatype="html">
@@ -1028,14 +1048,6 @@
10281048
<context context-type="linenumber">38</context>
10291049
</context-group>
10301050
</trans-unit>
1031-
<trans-unit id="3833692663709091545" datatype="html">
1032-
<source>Name is required</source>
1033-
<target>Nom est obligatoire</target>
1034-
<context-group purpose="location">
1035-
<context context-type="sourcefile">src/app/pages/form/form-new/volume/new/name/name.component.ts</context>
1036-
<context context-type="linenumber">128</context>
1037-
</context-group>
1038-
</trans-unit>
10391051
<trans-unit id="8070356952314717725" datatype="html">
10401052
<source>The volume name can only contain lowercase alphanumeric characters,
10411053
&apos;-&apos; or &apos;.&apos;, and must start and end with an alphanumeric character</source>
@@ -1226,7 +1238,7 @@
12261238
</context-group>
12271239
<context-group purpose="location">
12281240
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1229-
<context context-type="linenumber">202</context>
1241+
<context context-type="linenumber">211</context>
12301242
</context-group>
12311243
</trans-unit>
12321244
<trans-unit id="8453883859090217683" datatype="html">
@@ -1633,31 +1645,31 @@
16331645
<target>Connecter à ce bloc-notes</target>
16341646
<context-group purpose="location">
16351647
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1636-
<context context-type="linenumber">205</context>
1648+
<context context-type="linenumber">214</context>
16371649
</context-group>
16381650
</trans-unit>
16391651
<trans-unit id="4614896654582325648" datatype="html">
16401652
<source>START</source>
16411653
<target>COMMENCER</target>
16421654
<context-group purpose="location">
16431655
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1644-
<context context-type="linenumber">214</context>
1656+
<context context-type="linenumber">223</context>
16451657
</context-group>
16461658
</trans-unit>
16471659
<trans-unit id="3724644189271174723" datatype="html">
16481660
<source>Start this notebook</source>
16491661
<target>Commencer ce bloc-notes</target>
16501662
<context-group purpose="location">
16511663
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1652-
<context context-type="linenumber">216</context>
1664+
<context context-type="linenumber">225</context>
16531665
</context-group>
16541666
</trans-unit>
16551667
<trans-unit id="2616985041535023317" datatype="html">
16561668
<source>STOP</source>
16571669
<target>ARRÊT</target>
16581670
<context-group purpose="location">
16591671
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1660-
<context context-type="linenumber">225</context>
1672+
<context context-type="linenumber">234</context>
16611673
</context-group>
16621674
<context-group purpose="location">
16631675
<context context-type="sourcefile">src/app/services/config.ts</context>
@@ -1669,15 +1681,15 @@
16691681
<target>Arrêter ce bloc-notes</target>
16701682
<context-group purpose="location">
16711683
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1672-
<context context-type="linenumber">228</context>
1684+
<context context-type="linenumber">237</context>
16731685
</context-group>
16741686
</trans-unit>
16751687
<trans-unit id="841311519047609428" datatype="html">
16761688
<source>DELETE</source>
16771689
<target>SUPPRIMER</target>
16781690
<context-group purpose="location">
16791691
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1680-
<context context-type="linenumber">237</context>
1692+
<context context-type="linenumber">246</context>
16811693
</context-group>
16821694
<context-group purpose="location">
16831695
<context context-type="sourcefile">src/app/pages/volume-details-page/volume-details-page.component.ts</context>
@@ -1697,7 +1709,7 @@
16971709
<target>Supprimer ce bloc-notes</target>
16981710
<context-group purpose="location">
16991711
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1700-
<context context-type="linenumber">240</context>
1712+
<context context-type="linenumber">249</context>
17011713
</context-group>
17021714
</trans-unit>
17031715
<trans-unit id="8f4cd1bcd0815dd9d40c71310c17460d8d594d99" datatype="html">

frontend/jupyter/i18n/messages.xlf

+30-19
Original file line numberDiff line numberDiff line change
@@ -707,18 +707,25 @@
707707
<context context-type="linenumber">114</context>
708708
</context-group>
709709
</trans-unit>
710+
<trans-unit id="8679122523698617738" datatype="html">
711+
<source>Custom image is required</source>
712+
<context-group purpose="location">
713+
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
714+
<context context-type="linenumber">81</context>
715+
</context-group>
716+
</trans-unit>
710717
<trans-unit id="6343667331017090565" datatype="html">
711718
<source><x id="PH" equiv-text="urlBeginning"/> is not allowed in URLs</source>
712719
<context-group purpose="location">
713720
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
714-
<context context-type="linenumber">88</context>
721+
<context context-type="linenumber">91</context>
715722
</context-group>
716723
</trans-unit>
717724
<trans-unit id="7769611021004782223" datatype="html">
718725
<source>This workspace type is disabled for profile &quot;<x id="PH" equiv-text="this.nsMetadata.metadata.name"/>&quot;.</source>
719726
<context-group purpose="location">
720727
<context context-type="sourcefile">src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts</context>
721-
<context context-type="linenumber">153</context>
728+
<context context-type="linenumber">156</context>
722729
</context-group>
723730
<context-group purpose="location">
724731
<context context-type="sourcefile">src/app/pages/form/form-new/form-image/form-image.component.ts</context>
@@ -778,7 +785,7 @@
778785
<source>No default Storage Class is set. Can&apos;t create new Disks for the new Notebook. Please use an Existing Disk.</source>
779786
<context-group purpose="location">
780787
<context context-type="sourcefile">src/app/pages/form/form-new/form-new.component.ts</context>
781-
<context context-type="linenumber">82</context>
788+
<context context-type="linenumber">85</context>
782789
</context-group>
783790
</trans-unit>
784791
<trans-unit id="e9eddff13e07404962037056840f5dc5568a9cc5" datatype="html">
@@ -857,11 +864,22 @@
857864
<context context-type="linenumber">44</context>
858865
</context-group>
859866
</trans-unit>
867+
<trans-unit id="3833692663709091545" datatype="html">
868+
<source>Name is required</source>
869+
<context-group purpose="location">
870+
<context context-type="sourcefile">src/app/pages/form/form-new/volume/existing/pvc/pvc.component.ts</context>
871+
<context context-type="linenumber">64</context>
872+
</context-group>
873+
<context-group purpose="location">
874+
<context context-type="sourcefile">src/app/pages/form/form-new/volume/new/name/name.component.ts</context>
875+
<context context-type="linenumber">128</context>
876+
</context-group>
877+
</trans-unit>
860878
<trans-unit id="8731812673197724196" datatype="html">
861879
<source>Is mounted</source>
862880
<context-group purpose="location">
863881
<context context-type="sourcefile">src/app/pages/form/form-new/volume/existing/pvc/pvc.component.ts</context>
864-
<context context-type="linenumber">64</context>
882+
<context context-type="linenumber">67</context>
865883
</context-group>
866884
</trans-unit>
867885
<trans-unit id="623533293782016444" datatype="html">
@@ -913,13 +931,6 @@
913931
<context context-type="linenumber">38</context>
914932
</context-group>
915933
</trans-unit>
916-
<trans-unit id="3833692663709091545" datatype="html">
917-
<source>Name is required</source>
918-
<context-group purpose="location">
919-
<context context-type="sourcefile">src/app/pages/form/form-new/volume/new/name/name.component.ts</context>
920-
<context context-type="linenumber">128</context>
921-
</context-group>
922-
</trans-unit>
923934
<trans-unit id="8070356952314717725" datatype="html">
924935
<source>The volume name can only contain lowercase alphanumeric characters,
925936
&apos;-&apos; or &apos;.&apos;, and must start and end with an alphanumeric character</source>
@@ -1091,7 +1102,7 @@
10911102
</context-group>
10921103
<context-group purpose="location">
10931104
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1094-
<context context-type="linenumber">202</context>
1105+
<context context-type="linenumber">211</context>
10951106
</context-group>
10961107
</trans-unit>
10971108
<trans-unit id="8453883859090217683" datatype="html">
@@ -1457,28 +1468,28 @@
14571468
<source>Connect to this notebook</source>
14581469
<context-group purpose="location">
14591470
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1460-
<context context-type="linenumber">205</context>
1471+
<context context-type="linenumber">214</context>
14611472
</context-group>
14621473
</trans-unit>
14631474
<trans-unit id="4614896654582325648" datatype="html">
14641475
<source>START</source>
14651476
<context-group purpose="location">
14661477
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1467-
<context context-type="linenumber">214</context>
1478+
<context context-type="linenumber">223</context>
14681479
</context-group>
14691480
</trans-unit>
14701481
<trans-unit id="3724644189271174723" datatype="html">
14711482
<source>Start this notebook</source>
14721483
<context-group purpose="location">
14731484
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1474-
<context context-type="linenumber">216</context>
1485+
<context context-type="linenumber">225</context>
14751486
</context-group>
14761487
</trans-unit>
14771488
<trans-unit id="2616985041535023317" datatype="html">
14781489
<source>STOP</source>
14791490
<context-group purpose="location">
14801491
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1481-
<context context-type="linenumber">225</context>
1492+
<context context-type="linenumber">234</context>
14821493
</context-group>
14831494
<context-group purpose="location">
14841495
<context context-type="sourcefile">src/app/services/config.ts</context>
@@ -1489,14 +1500,14 @@
14891500
<source>Stop this notebook</source>
14901501
<context-group purpose="location">
14911502
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1492-
<context context-type="linenumber">228</context>
1503+
<context context-type="linenumber">237</context>
14931504
</context-group>
14941505
</trans-unit>
14951506
<trans-unit id="841311519047609428" datatype="html">
14961507
<source>DELETE</source>
14971508
<context-group purpose="location">
14981509
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1499-
<context context-type="linenumber">237</context>
1510+
<context context-type="linenumber">246</context>
15001511
</context-group>
15011512
<context-group purpose="location">
15021513
<context context-type="sourcefile">src/app/pages/volume-details-page/volume-details-page.component.ts</context>
@@ -1515,7 +1526,7 @@
15151526
<source>Delete this notebook</source>
15161527
<context-group purpose="location">
15171528
<context context-type="sourcefile">src/app/pages/notebook-page/notebook-page.component.ts</context>
1518-
<context context-type="linenumber">240</context>
1529+
<context context-type="linenumber">249</context>
15191530
</context-group>
15201531
</trans-unit>
15211532
<trans-unit id="8f4cd1bcd0815dd9d40c71310c17460d8d594d99" datatype="html">

frontend/jupyter/src/app/pages/form/form-new/form-image-custom/form-image-custom.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export class FormImageCustomComponent implements OnInit, OnDestroy {
7777
urlValidation(): string {
7878
const url = this.parentForm.get('customImage');
7979

80+
if (url.hasError('required')) {
81+
return $localize`Custom image is required`;
82+
}
8083
if (url.hasError('invalidUrl')) {
8184
let urlBeginning = 'https://';
8285
const schemeReg = /^http:\/\//i;

frontend/jupyter/src/app/pages/form/form-new/volume/existing/pvc/pvc.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export class ExistingPvcComponent implements OnInit {
6060
showNameError() {
6161
const volumeName = this.pvcGroup.get('claimName');
6262

63+
if (volumeName.hasError('required')) {
64+
return $localize`Name is required`;
65+
}
6366
if (volumeName.hasError('isMounted')) {
6467
return $localize`Is mounted`;
6568
}

0 commit comments

Comments
 (0)