-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): Add component filtering based on key (#12032)
* Added key_filter field in Component model * Added key filter in Component setting form and implemented key filtering in Translation.check_sync * Applied changes based on comment and mitigated migration conflict * Improved the disable for key_filted in the UI and the filtering condition * Added tests and drop_key_filter_cache() * Improved the implementation of firing check_sync when saving and added a test * Updated code based on suggestions * Updated the validation error message Co-authored-by: Benjamin Alan Jamie <[email protected]>
- Loading branch information
1 parent
14ed62d
commit 29306e2
Showing
8 changed files
with
147 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright © Michal Čihař <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
# Generated by Django 5.1.1 on 2024-09-17 09:47 | ||
|
||
from django.db import migrations | ||
|
||
import weblate.trans.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("trans", "0023_alter_label_description"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="component", | ||
name="key_filter", | ||
field=weblate.trans.fields.RegexField( | ||
blank=True, | ||
default="", | ||
help_text="Regular expression used to filter keys. This is only available for monolingual formats.", | ||
max_length=500, | ||
verbose_name="Key filter", | ||
), | ||
), | ||
] |
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