1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing translation bug

This commit is contained in:
Patrik J. Braun 2019-01-08 10:52:39 +01:00
parent 04b032ff2a
commit 52d92f8a9d
5 changed files with 5 additions and 21 deletions

View File

@ -3,8 +3,7 @@ import {
LOCALE_ID,
NgModule,
TRANSLATIONS,
TRANSLATIONS_FORMAT,
MissingTranslationStrategy
TRANSLATIONS_FORMAT
} from '@angular/core';
import {BrowserModule, HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '@angular/platform-browser';
import {FormsModule} from '@angular/forms';
@ -63,7 +62,7 @@ import {HttpClientModule} from '@angular/common/http';
import {DefaultUrlSerializer, UrlSerializer, UrlTree} from '@angular/router';
import {IndexingSettingsComponent} from './settings/indexing/indexing.settings.component';
import {LanguageComponent} from './language/language.component';
import {I18n, MISSING_TRANSLATION_STRATEGY} from '@ngx-translate/i18n-polyfill';
import {I18n} from '@ngx-translate/i18n-polyfill';
import {QueryService} from './model/query.service';
import {IconizeSortingMethod} from './pipes/IconizeSortingMethod';
import {StringifySortingMethod} from './pipes/StringifySortingMethod';
@ -89,7 +88,6 @@ export class MyHammerConfig extends HammerGestureConfig {
}
export class CustomUrlSerializer implements UrlSerializer {
private _defaultUrlSerializer: DefaultUrlSerializer = new DefaultUrlSerializer();
@ -197,13 +195,8 @@ export function translationsFactory(locale: string) {
useFactory: translationsFactory,
deps: [LOCALE_ID]
},
I18n,
{provide: TRANSLATIONS, useValue: translationsFactory('en')},
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'},
{provide: LOCALE_ID, useValue: 'en'},
{provide: MISSING_TRANSLATION_STRATEGY, useValue: MissingTranslationStrategy.Ignore},
I18n
],
bootstrap: [AppComponent]
})

View File

@ -11,7 +11,6 @@ import {SortingMethods} from '../../../../common/entities/SortingMethods';
import {Config} from '../../../../common/config/public/Config';
import {SearchResultDTO} from '../../../../common/entities/SearchResultDTO';
import {SearchTypes} from '../../../../common/entities/AutoCompleteItem';
import {LightboxStates} from '../lightbox/lightbox.gallery.component';
@Component({
selector: 'app-gallery-navbar',

View File

@ -1533,10 +1533,6 @@
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<target>Images</target>
</trans-unit>
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">

View File

@ -1533,10 +1533,6 @@
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
<context context-type="linenumber">1</context>
</context-group>
<target>Képek</target>
</trans-unit>
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">

View File

@ -13,7 +13,7 @@
"pretest": "tsc",
"test": "ng test && mocha --recursive test/backend/unit && mocha --recursive test/backend/integration && mocha --recursive test/common/unit ",
"start": "node ./backend/index",
"run-dev": "ng build --aot --watch --output-path=./dist --i18n-locale en --i18n-format xlf --i18n-file frontend/translate/messages.en.xlf --i18n-missing-translation warning",
"run-dev": "ng build --aot --watch --output-path=./dist --i18n-locale en --i18n-file frontend/translate/messages.en.xlf --i18n-missing-translation warning",
"update-translation": "gulp update-translation",
"add-translation": "gulp add-translation"
},