Skip to content

Raise import limits#1035

Open
sspanak wants to merge 3 commits intomasterfrom
raise-import-limits
Open

Raise import limits#1035
sspanak wants to merge 3 commits intomasterfrom
raise-import-limits

Conversation

@sspanak
Copy link
Owner

@sspanak sspanak commented Jan 30, 2026

No description provided.

@sspanak sspanak self-assigned this Jan 30, 2026
@sspanak sspanak added the enhancement New feature or request label Jan 30, 2026
@sspanak sspanak requested a review from Copilot January 30, 2026 14:49
@sspanak sspanak force-pushed the raise-import-limits branch from 507ab2f to 5be8452 Compare January 30, 2026 14:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a user-toggleable way to raise the limits for importing custom words and refactors settings so those limits are configurable while improving import progress reporting and localization.

Changes:

  • Adds a new SwitchRaiseImportLimits preference and corresponding settings (SettingsAddedWords) to control maximum import file length and total custom word count, including a UI entry in the “Added words” category and localized strings.
  • Refactors the settings inheritance chain (SettingsHacks now extends SettingsAddedWords) so SettingsStore can expose added-word behaviors like “no confirmation” and raised import limits centrally.
  • Updates CustomWordsImporter and ItemImportCustomWords to use the new configurable limits, to validate file line count up front, and to switch progress handling to floats with more detailed progress display.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/src/main/res/xml/prefs_screen_languages.xml Wires the renamed SwitchAddWordsWithoutConfirmation and adds the new SwitchRaiseImportLimits toggle under the custom words preference category.
app/src/main/res/values/strings.xml Defines the base English title and detailed summary for the “Raise import limits” switch, including dynamic placeholders and warning text.
app/src/main/res/values-uk/strings.xml Adds Ukrainian translations for the new “raise import limits” title and summary.
app/src/main/res/values-tr/strings.xml Adds Turkish translations for the new import-limit summary and title.
app/src/main/res/values-ru/strings.xml Adds Russian translations for the new import-limit summary and title.
app/src/main/res/values-pt-rBR/strings.xml Adds Brazilian Portuguese translations for the new import-limit summary and title.
app/src/main/res/values-nl/strings.xml Adds Dutch translations for the new import-limit summary and title.
app/src/main/res/values-lt/strings.xml Adds Lithuanian translations for the new import-limit summary and title.
app/src/main/res/values-iw/strings.xml Adds Hebrew translations for the import-limit summary and title (with a slight formatting inconsistency vs. other locales noted).
app/src/main/res/values-it/strings.xml Adds Italian translations for the new import-limit summary and title.
app/src/main/res/values-fr/strings.xml Adds French translations for the new import-limit summary and title.
app/src/main/res/values-es/strings.xml Adds Spanish translations for the new import-limit summary and title.
app/src/main/res/values-de/strings.xml Adds German translations for the new import-limit summary and title.
app/src/main/res/values-bg/strings.xml Adds Bulgarian translations for the new import-limit summary and title.
app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsUI.java Removes the getAddWordsNoConfirmation helper, which is now provided via the new SettingsAddedWords-based chain.
app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsStatic.java Drops the hardcoded custom-words import and total limits in favor of the new configurable limits in SettingsAddedWords.
app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsHacks.java Changes the base class from BaseSettings to SettingsAddedWords, threading added-words settings into the full SettingsStore hierarchy.
app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsAddedWords.java New settings class encapsulating default and raised import limits plus getters for “add without confirmation” and “raise import limits”.
app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/SwitchRaiseImportLimits.java New switch preference that sets the key, default, title, and dynamic summary text for raising custom word import limits, driven by SettingsAddedWords constants.
app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/SwitchAddWordsWithoutConfirmation.java Renames and updates the class to SwitchAddWordsWithoutConfirmation while keeping the same preference key and behavior, and hides it when the main layout is stealth.
app/src/main/java/io/github/sspanak/tt9/preferences/screens/languages/ItemImportCustomWords.java Updates progress handling to use floats with formatted percentages, tracks last progress, and passes SettingsStore into the importer so it can use the new configurable limits.
app/src/main/java/io/github/sspanak/tt9/db/customWords/CustomWordsImporter.java Switches progress callbacks to float, injects max file-lines and word-count limits from settings, adds a pre-pass to validate line count, and uses the new maxWords in capacity checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sspanak sspanak force-pushed the raise-import-limits branch 2 times, most recently from 8e3c9d0 to 5e0bb37 Compare January 30, 2026 16:02
@sspanak sspanak requested a review from Copilot January 30, 2026 16:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sspanak sspanak force-pushed the raise-import-limits branch from 5e0bb37 to 830ea10 Compare January 30, 2026 16:11
@sspanak sspanak marked this pull request as ready for review January 30, 2026 16:59
@sspanak sspanak requested a review from Copilot January 30, 2026 16:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sspanak sspanak force-pushed the raise-import-limits branch 2 times, most recently from 2a808c6 to 5c10a69 Compare January 30, 2026 17:24
@sspanak sspanak requested a review from Copilot January 30, 2026 17:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sspanak sspanak force-pushed the drop-api-23-support branch from 3dd6fd1 to eeef93a Compare February 2, 2026 13:04
@sspanak sspanak force-pushed the raise-import-limits branch from 5c10a69 to f7b799e Compare February 2, 2026 13:04
@sspanak sspanak force-pushed the drop-api-23-support branch from eeef93a to 064fb7f Compare February 8, 2026 09:07
Base automatically changed from drop-api-23-support to master February 8, 2026 09:24
@sspanak sspanak force-pushed the raise-import-limits branch from f7b799e to de151fb Compare February 8, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants