File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 4343 variant: 'link',
4444 to: `/translate/nwp/${term.key}`,
4545 },
46+ {
47+ label: 'Markeer als consistent',
48+ color: 'neutral',
49+ onClick: () => uiStore.markUIConsistent(term.key),
50+ },
4651 ]"
4752 />
4853 </template >
Original file line number Diff line number Diff line change 11type State = {
22 consistentNWS : Record < string , string [ ] > ;
3+ consistentUI : string [ ] ;
34 nwpString : TranslationFile | undefined ;
45 nwpTranslations : ProgramUIFile | undefined ;
56 originalsString : TranslationFile ;
@@ -15,6 +16,9 @@ export const useUIStore = defineStore("ui", {
1516 [ key ] : [ ...( this . consistentNWS [ key ] || [ ] ) , otherKey ] ,
1617 } ;
1718 } ,
19+ markUIConsistent ( key : string ) {
20+ this . consistentUI . push ( key ) ;
21+ } ,
1822 } ,
1923 getters : {
2024 inconsistentNWS ( state ) : {
@@ -87,7 +91,9 @@ export const useUIStore = defineStore("ui", {
8791 } ,
8892 uiInconsistencies ( state ) : { key : string ; nwp : string ; nws : string } [ ] {
8993 return this . nwpKeys
90- . filter ( ( key ) => this . keys . includes ( key ) )
94+ . filter (
95+ ( key ) => this . keys . includes ( key ) && ! state . consistentUI . includes ( key ) ,
96+ )
9197 . map ( ( key ) => ( {
9298 key,
9399 nwp : state . nwpTranslations ?. [ key ] || "<LEGE VERTALING>" ,
@@ -99,6 +105,7 @@ export const useUIStore = defineStore("ui", {
99105 persist : true ,
100106 state : ( ) : State => ( {
101107 consistentNWS : { } ,
108+ consistentUI : [ ] ,
102109 nwpString : undefined ,
103110 nwpTranslations : undefined ,
104111 originalsString : "" ,
You can’t perform that action at this time.
0 commit comments