Spaces:
Paused
Paused
Update flare-ui/src/app/dialogs/project-edit-dialog/project-edit-dialog.component.ts
Browse files
flare-ui/src/app/dialogs/project-edit-dialog/project-edit-dialog.component.ts
CHANGED
|
@@ -92,7 +92,7 @@ export interface ProjectDialogData {
|
|
| 92 |
</mat-option>
|
| 93 |
}
|
| 94 |
@for (locale of availableLocales; track locale.code) {
|
| 95 |
-
<mat-option [value]="locale.
|
| 96 |
{{ locale.name }}
|
| 97 |
<span class="locale-code">{{ locale.code }}</span>
|
| 98 |
</mat-option>
|
|
@@ -192,7 +192,7 @@ export default class ProjectEditDialogComponent implements OnInit {
|
|
| 192 |
caption: this.data.project.caption || '',
|
| 193 |
icon: this.data.project.icon || 'folder',
|
| 194 |
description: this.data.project.description || '',
|
| 195 |
-
defaultLanguage: this.data.project.default_language || '
|
| 196 |
supportedLanguages: this.data.project.supported_languages || ['tr-TR'],
|
| 197 |
timezone: this.data.project.timezone || 'Europe/Istanbul',
|
| 198 |
region: this.data.project.region || 'tr-TR'
|
|
@@ -201,7 +201,7 @@ export default class ProjectEditDialogComponent implements OnInit {
|
|
| 201 |
caption: '',
|
| 202 |
icon: 'folder',
|
| 203 |
description: '',
|
| 204 |
-
defaultLanguage: '
|
| 205 |
supportedLanguages: ['tr-TR'],
|
| 206 |
timezone: 'Europe/Istanbul',
|
| 207 |
region: 'tr-TR'
|
|
@@ -293,6 +293,11 @@ export default class ProjectEditDialogComponent implements OnInit {
|
|
| 293 |
}
|
| 294 |
}
|
| 295 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 296 |
getLocaleName(code: string): string {
|
| 297 |
const locale = this.availableLocales.find(l => l.code === code);
|
| 298 |
return locale ? locale.name : code;
|
|
|
|
| 92 |
</mat-option>
|
| 93 |
}
|
| 94 |
@for (locale of availableLocales; track locale.code) {
|
| 95 |
+
<mat-option [value]="locale.name">
|
| 96 |
{{ locale.name }}
|
| 97 |
<span class="locale-code">{{ locale.code }}</span>
|
| 98 |
</mat-option>
|
|
|
|
| 192 |
caption: this.data.project.caption || '',
|
| 193 |
icon: this.data.project.icon || 'folder',
|
| 194 |
description: this.data.project.description || '',
|
| 195 |
+
defaultLanguage: this.data.project.default_language || 'Türkçe',
|
| 196 |
supportedLanguages: this.data.project.supported_languages || ['tr-TR'],
|
| 197 |
timezone: this.data.project.timezone || 'Europe/Istanbul',
|
| 198 |
region: this.data.project.region || 'tr-TR'
|
|
|
|
| 201 |
caption: '',
|
| 202 |
icon: 'folder',
|
| 203 |
description: '',
|
| 204 |
+
defaultLanguage: 'Türkçe',
|
| 205 |
supportedLanguages: ['tr-TR'],
|
| 206 |
timezone: 'Europe/Istanbul',
|
| 207 |
region: 'tr-TR'
|
|
|
|
| 293 |
}
|
| 294 |
}
|
| 295 |
|
| 296 |
+
getLanguageNameForPrompt(locale: Locale): string {
|
| 297 |
+
// Locale'den language_name'i al, yoksa english_name kullan
|
| 298 |
+
return (locale as any).language_name || locale.english_name || locale.name;
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
getLocaleName(code: string): string {
|
| 302 |
const locale = this.availableLocales.find(l => l.code === code);
|
| 303 |
return locale ? locale.name : code;
|