* Make OkHttpConnectionFactory raise MwIOException when a non-suppressed API call returns an error
* Add AlertDialog displaying specific error message when categories search API call returns an error
* Add test for error alert dialog to UploadCategoriesFragment unit tests
* Add error handling when API call fails to CategoriesPresenter.onAttachViewWithMedia
I noticed this issue years ago because it used a hard-to-understand
string that needed better documentation (see #688). I forgot it,
but recently, I started to explore the app much more deeply and
came back to it.
It looks like this string is only used in this layout element,
but the element itself is not used anywhere. It usage appears to
have been removed in #634.
* Disable hardware acceleration and keyboard animation
This is a temporary commit to see if it fixes issue #3364
* Remove unused import
* Bump up version code and modify version name
* Modify handleKeyboardInsets to handle insets correctly
* Refactor handleKeyboardInsets()
* Refactor handleKeyboardInsets()
* Fix inset in login activity
* Add braces to conditions.
* Remove an unnecessary semicolon.
* Remove an unnecessary constructor.
This fixes all the Java lint errors of these types.
Strings files for he, id, yi were replaced with iw, in, and ji in 2016.
Those files cause build warnings, and they aren't used,
so it's OK to just remove them.
* test:add mock JSON resource files for campaigns API responses
* feat:make campaign model fields mutable to allow for correct deserialization
* test:implement unit tests for fetching campaigns and fix DTO mocking logic
* test:implement unit tests for fetching campaigns and fix DTO mocking logic
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Change trivial string formatting and function calls
for Timber logging.
This resolves all the lint warnings in the
Android/Lint/Correctness/Messages group.
Lint recommended replacing Switch with SwitchMaterial.
This was a very simple replacement, and I tested it in
the custom selector, where it is used, and it works as
it worked previously.
* Update alternative texts for the welcome screen
I've also updated their documentation for translators (qq)
in transltaewiki itself.
Resolves#689.
* Fixed typo
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
I was working on this file recently, and Android Studio
showed a warning that it has tabs instead of spaces,
so here's it's fixed.
A minor thing, but prevents distractions.
The "Inspect Code" linter complained that these two files
had Right-to-left text compatibility issues. I couldn't
really see any problems neither in English nor in Hebrew,
but the linter's suggestion still made sense, so I cleaned it up.
This fixes all the errors of the type
"Android Lint: Internationalization / Right-to-left text compatibility issues".
There should be a comma before "etc." in a list,
and there already is a comma before "etc."
in the string depicts_search_text_hint, so it should be
in this string to for consistency.
Resolves issue #6492.
Remove the title of a web activity and the accompanying
string resource.
This was not a real translatable message, but something that
looks more like an identifier that shouldn't be translated.
As far as I can tell, it's not seen anywhere in the interface
because the actual title is set in the code that calls it.
This fixes the layouts to work in both left to right (LTR)
and right to left (RTL) languages.
Also replace two hard-coded strings in the depicts picker
with proper string resources.
Fixes#6502.
All these messages are not really necessary because
the app has its own localizations, and android.R.string
sometimes doesn't display the localized string.
Resolves#6470.
Make the text of the panel consistent with its title.
The title is "Featured images", so the text should
use the same term.
Also move this resource next to the title, to make it easier
for the translators.
* Prevent IndexOutOfBoundsException in setUploadMediaDetails by validating index and list size (#6404)
* fixed UninitializedPropertyAccessException by safely initializing and accessing imageAdapter (#6404)
* fixed indexOutOfBoundsException by safely handling saved state and index in onViewCreated (#6404)
* resolve Unresolved reference by replacing setImageToBeUploaded with direct field assignments (#6404)
* Fix test compilation by removing obsolete testSetImageToBeUploaded and adding tha testInitializeFragmentWithUploadItem (#6404)
* Fix test compilation by removing testInitializeFragmentWithUploadItem with unresolved onImageProcessed (#6404)
* fix: test failures in UploadMediaDetailFragmentUnitTest by removing obsolete tests and initializing defaultKvStore (#6404)
* Fixed all the typos
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
I was going over all the strings and documenting them (see #6457),
and I had a very hard time understand what this message does.
I read the code and finally figured it out. I added qq documentation
for it so now it's clearer, but I also think that the English
message can be clearer:
* "subsequent" changed to "the next" - shorter, easier word.
* "media" changed to "item" - "media" could mean a lot of things,
and "item" is clearer in this context.
* DatabaseUtils.kt: change getString() to allow null returns
Before this change, a call to getString() would assume that the specified column
name actually exists. A bad String input would cause a null value to be returned
to getString(), which would then throw a NPE because getString() can only return
non null Strings.
This change expands the getString() method to check if the column name exists.
If it does exist, the String is retrieved normally. Else, a null value is
returned. The method signature is changed to allow null return values.
* *Dao.kt: change some usages of getString()
Before this change, the getString() method in DatabaseUtils.kt was changed
to allow returning a null value upon method failure. All usages of getString()
were not changed.
This change updates all usages of getString() which require non null return
values. If null is returned, an empty string is used instead.
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Its usage was removed from the file
app/src/main/res/layout/fragment_achievements.xml in a8387f0,
but the message remained in the strings file.
Resolves#6456.
As I was documenting undocumented strings (see #6457), I noticed
that two messages are only used once in a few lines of code that
were commented out in 2023.
To clean up the messages, I am removing them from the strings
list and deleting the commented-out code.
Android Studio reported that there's an identifier
with a non-ASCII letter. It was nearbyFılterStateInstance,
with a Turkish dotless i. I renamed to ASCII dotted i.
This brings the number of Internationalization
issues in Inspect Code to zero.