Skip to content

Commit

Permalink
fixing translation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatrik committed Jan 8, 2019
1 parent 04b032f commit 52d92f8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 21 deletions.
13 changes: 3 additions & 10 deletions frontend/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -89,7 +88,6 @@ export class MyHammerConfig extends HammerGestureConfig {
}



export class CustomUrlSerializer implements UrlSerializer {
private _defaultUrlSerializer: DefaultUrlSerializer = new DefaultUrlSerializer();

Expand Down Expand Up @@ -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]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 0 additions & 4 deletions frontend/translate/messages.en.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
6 changes: 1 addition & 5 deletions frontend/translate/messages.hu.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -1904,4 +1900,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit 52d92f8

Please sign in to comment.