diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbb718cc8..85db2d482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3.7 - name: Get pip cache dir id: pip-cache @@ -49,6 +49,39 @@ jobs: name: documentation path: docs/_build/html/ + codestyle: + runs-on: ubuntu-20.04 + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - + name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + - + name: Persistent Github pip cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip${{ matrix.python-version }} + - + name: Install dependencies + run: | + pip install --upgrade pipenv + pipenv install --system --dev --ignore-pipfile + - + name: Codestyle + run: | + cd src/ + pycodestyle + tests: runs-on: ubuntu-20.04 strategy: @@ -76,7 +109,7 @@ jobs: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip${{ matrix.python-version }} - - name: Prepare tests + name: Install dependencies run: | sudo apt-get update -qq sudo apt-get install -qq --no-install-recommends unpaper tesseract-ocr imagemagick ghostscript optipng @@ -87,11 +120,6 @@ jobs: run: | cd src/ pytest - - - name: Codestyle - run: | - cd src/ - pycodestyle - name: Publish coverage results if: matrix.python-version == '3.8' @@ -130,7 +158,7 @@ jobs: path: src/documents/static/frontend/ build-release: - needs: [frontend, documentation, tests] + needs: [frontend, documentation, tests, codestyle] runs-on: ubuntu-20.04 steps: - @@ -240,7 +268,7 @@ jobs: build-docker-image: if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-')) runs-on: ubuntu-latest - needs: [frontend, tests] + needs: [frontend, tests, codestyle] steps: - name: Prepare diff --git a/README.md b/README.md index aebd774e0..b21173ba5 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,9 @@ The documentation for Paperless-ng is available on [ReadTheDocs](https://paperle # Translation -Paperless is currently available in English, German, Dutch and French. Translation is coordinated at transifex: https://www.transifex.com/paperless/paperless-ng +Paperless is currently available in English, German, Dutch, French, and Portuguese. -If you want to see paperless in your own language, request that language at transifex and you can start translating after I approve the language. +There's an active translation project at transifex! If you want to help out by translating paperless into your language, please head over to https://github.com/jonaswinkler/paperless-ng/issues/212 for details. # Feature Requests diff --git a/docs/changelog.rst b/docs/changelog.rst index b23ca5137..73e457176 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,19 @@ Changelog ********* +paperless-ng 1.2.1 +################## + +* `Rodrigo Avelino `_ translated Paperless into Portuguese (Brazil)! + +* The date input fields now respect the currently selected date format. + +* Added a fancy icon when adding paperless to the home screen on iOS devices. Thanks to `Joel Nordell `_. + +* When using regular expression matching, the regular expression is now validated before saving the tag/correspondent/type. + +* Regression fix: Dates on the front end did not respect date locale settings in some cases. + paperless-ng 1.2.0 ################## diff --git a/src-ui/angular.json b/src-ui/angular.json index a26dd8713..2877408d2 100644 --- a/src-ui/angular.json +++ b/src-ui/angular.json @@ -19,7 +19,8 @@ "de": "src/locale/messages.de.xlf", "nl-NL": "src/locale/messages.nl_NL.xlf", "fr": "src/locale/messages.fr.xlf", - "en-GB": "src/locale/messages.en_GB.xlf" + "en-GB": "src/locale/messages.en_GB.xlf", + "pt-BR": "src/locale/messages.pt_BR.xlf" } }, "architect": { @@ -36,6 +37,7 @@ "aot": true, "assets": [ "src/favicon.ico", + "src/apple-touch-icon.png", "src/assets", "src/manifest.webmanifest", { "glob": "pdf.worker.min.js", @@ -112,6 +114,7 @@ "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", + "src/apple-touch-icon.png", "src/assets", "src/manifest.webmanifest" ], diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index 95e0fad15..d04d5a6f8 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -531,28 +531,21 @@ Use system language src/app/components/manage/settings/settings.component.ts - 91 + 92 Use date format of display language src/app/components/manage/settings/settings.component.ts - 96 - - - - ISO 8601 - - src/app/components/manage/settings/settings.component.ts - 97 + 98 Error while storing settings on server: src/app/components/manage/settings/settings.component.ts - 114 + 115 @@ -1605,6 +1598,13 @@ 21 + + Invalid date. + + src/app/components/common/input/date/date.component.html + 13 + + Yes @@ -1630,35 +1630,49 @@ English (US) src/app/services/settings.service.ts - 82 + 88 English (GB) src/app/services/settings.service.ts - 83 + 89 German src/app/services/settings.service.ts - 84 + 90 Dutch src/app/services/settings.service.ts - 85 + 91 French src/app/services/settings.service.ts - 86 + 92 + + + + Portuguese (Brazil) + + src/app/services/settings.service.ts + 93 + + + + ISO 8601 + + src/app/services/settings.service.ts + 98 diff --git a/src-ui/package-lock.json b/src-ui/package-lock.json index 148bc72eb..fd6d69538 100644 --- a/src-ui/package-lock.json +++ b/src-ui/package-lock.json @@ -2055,9 +2055,9 @@ } }, "@ng-bootstrap/ng-bootstrap": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-8.0.0.tgz", - "integrity": "sha512-v77Gfd8xHH+exq0WqIqVRlxbUEHdA/2+RUJenUP2IDTQN9E1rWl7O461/kosr+0XPuxPArHQJxhh/WsCYckcNg==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-8.0.4.tgz", + "integrity": "sha512-EdxTwOPOtlvfnwrglPniulmzdnXdXH3lTGaGAY1HrYRvdtGg6wicRvl+BvwVE/3Qik5NPkOWMVghUHpv3evIYg==", "requires": { "tslib": "^2.0.0" } diff --git a/src-ui/package.json b/src-ui/package.json index d6082c6b9..a4d014284 100644 --- a/src-ui/package.json +++ b/src-ui/package.json @@ -20,7 +20,7 @@ "@angular/platform-browser": "~10.1.5", "@angular/platform-browser-dynamic": "~10.1.5", "@angular/router": "~10.1.5", - "@ng-bootstrap/ng-bootstrap": "^8.0.0", + "@ng-bootstrap/ng-bootstrap": "^8.0.4", "@ng-select/ng-select": "^5.0.9", "bootstrap": "^4.5.0", "file-saver": "^2.0.5", diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index 54c19a216..cf28b1e0a 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -3,7 +3,7 @@ import { NgModule } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgbDateAdapter, NgbDateParserFormatter, NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { DocumentListComponent } from './components/document-list/document-list.component'; import { DocumentDetailComponent } from './components/document-detail/document-detail.component'; @@ -39,7 +39,6 @@ import { SelectComponent } from './components/common/input/select/select.compone import { CheckComponent } from './components/common/input/check/check.component'; import { SaveViewConfigDialogComponent } from './components/document-list/save-view-config-dialog/save-view-config-dialog.component'; import { InfiniteScrollModule } from 'ngx-infinite-scroll'; -import { DateTimeComponent } from './components/common/input/date-time/date-time.component'; import { TagsComponent } from './components/common/input/tags/tags.component'; import { SortableDirective } from './directives/sortable.directive'; import { CookieService } from 'ngx-cookie-service'; @@ -60,15 +59,21 @@ import { NgSelectModule } from '@ng-select/ng-select'; import { NumberComponent } from './components/common/input/number/number.component'; import { SafePipe } from './pipes/safe.pipe'; import { CustomDatePipe } from './pipes/custom-date.pipe'; +import { DateComponent } from './components/common/input/date/date.component'; +import { ISODateTimeAdapter } from './utils/ngb-iso-date-time-adapter'; +import { LocalizedDateParserFormatter } from './utils/ngb-date-parser-formatter'; +import { ApiVersionInterceptor } from './interceptors/api-version.interceptor'; import localeFr from '@angular/common/locales/fr'; import localeNl from '@angular/common/locales/nl'; import localeDe from '@angular/common/locales/de'; +import localePt from '@angular/common/locales/pt'; import localeEnGb from '@angular/common/locales/en-GB'; registerLocaleData(localeFr) registerLocaleData(localeNl) registerLocaleData(localeDe) +registerLocaleData(localePt, "pt-BR") registerLocaleData(localeEnGb) @NgModule({ @@ -104,7 +109,6 @@ registerLocaleData(localeEnGb) SelectComponent, CheckComponent, SaveViewConfigDialogComponent, - DateTimeComponent, TagsComponent, SortableDirective, SavedViewWidgetComponent, @@ -120,7 +124,8 @@ registerLocaleData(localeEnGb) SelectDialogComponent, NumberComponent, SafePipe, - CustomDatePipe + CustomDatePipe, + DateComponent ], imports: [ BrowserModule, @@ -140,9 +145,15 @@ registerLocaleData(localeEnGb) provide: HTTP_INTERCEPTORS, useClass: CsrfInterceptor, multi: true + },{ + provide: HTTP_INTERCEPTORS, + useClass: ApiVersionInterceptor, + multi: true }, FilterPipe, - DocumentTitlePipe + DocumentTitlePipe, + {provide: NgbDateAdapter, useClass: ISODateTimeAdapter}, + {provide: NgbDateParserFormatter, useClass: LocalizedDateParserFormatter} ], bootstrap: [AppComponent] }) diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html index 34a978fe5..5692d9f78 100644 --- a/src-ui/src/app/components/app-frame/app-frame.component.html +++ b/src-ui/src/app/components/app-frame/app-frame.component.html @@ -94,7 +94,7 @@  {{d.title | documentTitle}} -