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:
parent
04b032ff2a
commit
52d92f8a9d
@ -3,8 +3,7 @@ import {
|
|||||||
LOCALE_ID,
|
LOCALE_ID,
|
||||||
NgModule,
|
NgModule,
|
||||||
TRANSLATIONS,
|
TRANSLATIONS,
|
||||||
TRANSLATIONS_FORMAT,
|
TRANSLATIONS_FORMAT
|
||||||
MissingTranslationStrategy
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {BrowserModule, HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '@angular/platform-browser';
|
import {BrowserModule, HAMMER_GESTURE_CONFIG, HammerGestureConfig} from '@angular/platform-browser';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
@ -63,7 +62,7 @@ import {HttpClientModule} from '@angular/common/http';
|
|||||||
import {DefaultUrlSerializer, UrlSerializer, UrlTree} from '@angular/router';
|
import {DefaultUrlSerializer, UrlSerializer, UrlTree} from '@angular/router';
|
||||||
import {IndexingSettingsComponent} from './settings/indexing/indexing.settings.component';
|
import {IndexingSettingsComponent} from './settings/indexing/indexing.settings.component';
|
||||||
import {LanguageComponent} from './language/language.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 {QueryService} from './model/query.service';
|
||||||
import {IconizeSortingMethod} from './pipes/IconizeSortingMethod';
|
import {IconizeSortingMethod} from './pipes/IconizeSortingMethod';
|
||||||
import {StringifySortingMethod} from './pipes/StringifySortingMethod';
|
import {StringifySortingMethod} from './pipes/StringifySortingMethod';
|
||||||
@ -89,7 +88,6 @@ export class MyHammerConfig extends HammerGestureConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class CustomUrlSerializer implements UrlSerializer {
|
export class CustomUrlSerializer implements UrlSerializer {
|
||||||
private _defaultUrlSerializer: DefaultUrlSerializer = new DefaultUrlSerializer();
|
private _defaultUrlSerializer: DefaultUrlSerializer = new DefaultUrlSerializer();
|
||||||
|
|
||||||
@ -197,13 +195,8 @@ export function translationsFactory(locale: string) {
|
|||||||
useFactory: translationsFactory,
|
useFactory: translationsFactory,
|
||||||
deps: [LOCALE_ID]
|
deps: [LOCALE_ID]
|
||||||
},
|
},
|
||||||
I18n,
|
|
||||||
|
|
||||||
{provide: TRANSLATIONS, useValue: translationsFactory('en')},
|
|
||||||
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'},
|
{provide: TRANSLATIONS_FORMAT, useValue: 'xlf'},
|
||||||
{provide: LOCALE_ID, useValue: 'en'},
|
I18n
|
||||||
{provide: MISSING_TRANSLATION_STRATEGY, useValue: MissingTranslationStrategy.Ignore},
|
|
||||||
|
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
|
@ -11,7 +11,6 @@ import {SortingMethods} from '../../../../common/entities/SortingMethods';
|
|||||||
import {Config} from '../../../../common/config/public/Config';
|
import {Config} from '../../../../common/config/public/Config';
|
||||||
import {SearchResultDTO} from '../../../../common/entities/SearchResultDTO';
|
import {SearchResultDTO} from '../../../../common/entities/SearchResultDTO';
|
||||||
import {SearchTypes} from '../../../../common/entities/AutoCompleteItem';
|
import {SearchTypes} from '../../../../common/entities/AutoCompleteItem';
|
||||||
import {LightboxStates} from '../lightbox/lightbox.gallery.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-gallery-navbar',
|
selector: 'app-gallery-navbar',
|
||||||
|
@ -1533,10 +1533,6 @@
|
|||||||
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
|
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
|
||||||
<context context-type="linenumber">1</context>
|
<context context-type="linenumber">1</context>
|
||||||
</context-group>
|
</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>
|
<target>Images</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">
|
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">
|
||||||
|
@ -1533,10 +1533,6 @@
|
|||||||
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
|
<context context-type="sourcefile">frontend/app/gallery/navigator/navigator.gallery.component.ts</context>
|
||||||
<context context-type="linenumber">1</context>
|
<context context-type="linenumber">1</context>
|
||||||
</context-group>
|
</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>
|
<target>Képek</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">
|
<trans-unit id="4f20f2d5a6882190892e58b85f6ccbedfa737952" datatype="html">
|
||||||
@ -1904,4 +1900,4 @@
|
|||||||
</trans-unit>
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
@ -13,7 +13,7 @@
|
|||||||
"pretest": "tsc",
|
"pretest": "tsc",
|
||||||
"test": "ng test && mocha --recursive test/backend/unit && mocha --recursive test/backend/integration && mocha --recursive test/common/unit ",
|
"test": "ng test && mocha --recursive test/backend/unit && mocha --recursive test/backend/integration && mocha --recursive test/common/unit ",
|
||||||
"start": "node ./backend/index",
|
"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",
|
"update-translation": "gulp update-translation",
|
||||||
"add-translation": "gulp add-translation"
|
"add-translation": "gulp add-translation"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user