-
-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pui-add-startpage-to-admin
- Loading branch information
Showing
105 changed files
with
3,974 additions
and
1,924 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,11 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
build: | ||
synchronize-with-crowdin: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -39,16 +40,29 @@ jobs: | |
apt-dependency: gettext | ||
- name: Make Translations | ||
run: invoke translate | ||
- name: Commit files | ||
- name: Remove compiled static files | ||
run: rm -rf src/backend/InvenTree/static | ||
- name: Remove all local changes that are not *.po files | ||
run: | | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git checkout -b l10_local | ||
git add "*.po" | ||
git commit -m "updated translation base" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # [email protected] | ||
git add src/backend/InvenTree/locale/en/LC_MESSAGES/django.po src/frontend/src/locales/en/messages.po | ||
git commit -m "add translations" | ||
git reset --hard | ||
git reset HEAD~ | ||
- name: crowdin action | ||
uses: crowdin/github-action@6ed209d411599a981ccb978df3be9dc9b8a81699 # pin@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: l10 | ||
force: true | ||
upload_sources: true | ||
upload_translations: false | ||
download_translations: true | ||
localization_branch_name: l10_crowdin | ||
create_pull_request: true | ||
pull_request_title: 'New Crowdin updates' | ||
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)' | ||
pull_request_base_branch_name: 'l10' | ||
pull_request_labels: 'translations' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
# Configuration file for Crowdin project integration | ||
# See: https://crowdin.com/project/inventree | ||
|
||
"commit_message": "Fix: New translations %original_file_name% from Crowdin" | ||
"append_commit_message": false | ||
"preserve_hierarchy": true | ||
|
||
files: | ||
- source: /src/backend/InvenTree/locale/en/LC_MESSAGES/django.po | ||
dest: /%original_path%/%original_file_name% | ||
translation: /src/backend/InvenTree/locale/%two_letters_code%/LC_MESSAGES/%original_file_name% | ||
- source: /src/frontend/src/locales/en/messages.po | ||
dest: /%original_path%/%original_file_name% | ||
translation: /src/frontend/src/locales/%two_letters_code%/%original_file_name% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Custom States | ||
--- | ||
|
||
## Custom States | ||
|
||
Several models within InvenTree support the use of custom states. The custom states are display only - the business logic is not affected by the state. | ||
|
||
States can be added in the Admin Center under the "Custom States" section. Each state has a name, label and a color that are used to display the state in the user interface. Changes to these settings will only be reflected in the user interface after a full reload of the interface. | ||
|
||
States need to be assigned to a model, state (for example status on a StockItem) and a logical key - that will be used for business logic. These 3 values combined need to be unique throughout the system. | ||
|
||
Custom states can be used in the following models: | ||
- StockItem | ||
- Orders (PurchaseOrder, SalesOrder, ReturnOrder, ReturnOrderLine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/backend/InvenTree/build/migrations/0052_build_status_custom_key_alter_build_status.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Generated by Django 4.2.14 on 2024-08-07 22:40 | ||
|
||
import django.core.validators | ||
from django.db import migrations | ||
|
||
import generic.states.fields | ||
import InvenTree.status_codes | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("build", "0051_delete_buildorderattachment"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="build", | ||
name="status_custom_key", | ||
field=generic.states.fields.ExtraInvenTreeCustomStatusModelField( | ||
blank=True, | ||
default=None, | ||
help_text="Additional status information for this item", | ||
null=True, | ||
verbose_name="Custom status key", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="build", | ||
name="status", | ||
field=generic.states.fields.InvenTreeCustomStatusModelField( | ||
choices=InvenTree.status_codes.BuildStatus.items(), | ||
default=10, | ||
help_text="Build status code", | ||
validators=[django.core.validators.MinValueValidator(0)], | ||
verbose_name="Build Status", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.