* Add braces to conditions.
* Remove an unnecessary semicolon.
* Remove an unnecessary constructor.
This fixes all the Java lint errors of these types.
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.
* added hash code to folder.kt and image.kt to pair with equals
* fixed deprecation in readParcelable function
---------
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Another comment: While working on this, I also noticed that
"Recent Searches" is hardcoded in the XML file, and
I'm not sure where does it actually appear. I fixed it, too,
but perhaps it can be completely removed.
Fixes#6439.