- Remove unused translation entries from translations.de.yaml
- Improve translation test to better detect obsolete entries
- Add KNOWN_NEEDED_MODULES for special cases
- Add helper function _message_exists_in_code for better translation verification
- Improve error messages to show both original and translated text
- Fix import sorting in test file
This commit improves the maintainability of the translation system by
removing unused entries and enhancing the verification process.
This reverts commit cfe2b900c7.
The custom scripts introduced to auto-format imports (to enforce project guidelines) caused issues. Specifically, isort’s hardcoded behavior for expanded standard library imports with “as” imports led to unintended formatting. This commit reverts those changes and removes the custom scripts, restoring the project to its previous, stable state.
This commit implements a new 'changed' selector for the --ads option that
publishes only ads that have been modified since their last publication.
The 'due' selector now only republishes ads based on the time interval,
without considering content changes.
The implementation allows combining selectors with commas (e.g., --ads=changed,due)
to publish both changed and due ads. Documentation and translations have been
updated accordingly.
Fixes#411
The description field in the main configuration (ad_defaults) is now optional.
Previously, the bot would fail if no description or affixes were provided in
the main configuration. This change addresses issue #435.
Changes:
- Add fallback to empty string ("") when all description prefix/suffix sources
are None in __get_description_with_affixes method
- Add comprehensive test suite for description handling in test_init.py
- Fix coverage path in pyproject.toml from 'kleinanzeigen_bot' to
'src/kleinanzeigen_bot'
New tests cover:
- Description handling without main config description
- New format affixes in configuration
- Mixed old/new format affixes
- Ad-level affix precedence
- None value handling in affixes
- Email address @ symbol replacement
This change maintains backward compatibility while making the description
field optional in the main configuration, improving flexibility for users.
Consolidate description text processing into __get_description_with_affixes method:
- Move @ -> (at) replacement into the method
- Remove duplicate prefix/suffix handling code
- Ensure consistent description text processing in one place
This fixes#432 by ensuring consistent handling of description affixes
and text transformations.
This commit addresses an issue where the content hash was being calculated on the current configuration (`ad_cfg`) instead of the original configuration (`ad_cfg_orig`). This could lead to inconsistent hash values, especially when the configuration is updated during the execution of the program.
The fix involves calculating the content hash on the original configuration (`ad_cfg_orig`) in both the `__check_ad_republication` and `publish_ad` methods. This ensures that the hash value is consistent and matches what was stored.
The relevant code changes are as follows:
- In the `__check_ad_republication` method, the content hash is now calculated on `ad_cfg_orig` instead of `ad_cfg`.
- In the `publish_ad` method, the content hash is also calculated on `ad_cfg_orig` to ensure consistency.
These changes should improve the reliability of the content hash comparison and the overall stability of the application.