[UI] Replace hardcoded strings in the settings #103

Closed
opened 2020-06-03 15:54:16 +00:00 by 6543 · 4 comments
Member

Replace hardcodet strings in fragments/SettingsFragment.java with strings who can be translated via strings.xml

    private static String[] langList = {"English", "French", "German", "Russian", "Arabic"};
    private static String[] timeList = {"Pretty", "Normal"};
    private static String[] codeBlockList = {"Green - Black", "White - Black", "Grey - Black", "White - Grey", "Dark - White"};
    private static String[] homeScreenList = {"My Repositories", "Starred Repositories", "Organizations", "Repositories", "Profile"};
Replace hardcodet strings in **fragments/SettingsFragment.java** with strings who can be translated via strings.xml ```java private static String[] langList = {"English", "French", "German", "Russian", "Arabic"}; private static String[] timeList = {"Pretty", "Normal"}; private static String[] codeBlockList = {"Green - Black", "White - Black", "Grey - Black", "White - Grey", "Dark - White"}; private static String[] homeScreenList = {"My Repositories", "Starred Repositories", "Organizations", "Repositories", "Profile"}; ```
6543 added the
🚀 Improvement
label 2020-06-03 15:54:16 +00:00
Owner

These strings are used as identifier to match the string in switch case for changing languages etc.

Translating them will make the app crash unless IDs are introduced. Let's see what I can do about it.

These strings are used as identifier to match the string in switch case for changing languages etc. Translating them will make the app crash unless IDs are introduced. Let's see what I can do about it.
Author
Member

I noticed,it won't be easy

I noticed,it won't be easy
Owner

Yes, need some work.

But let's keep this issue open for now and who knows can refactor in the future.

Yes, need some work. But let's keep this issue open for now and who knows can refactor in the future.
Owner

This commit has made it possible to add new strings dynamically and translate them also.

377040add6

This commit has made it possible to add new strings dynamically and translate them also. https://codeberg.org/gitnex/GitNex/commit/377040add6c36ecc9a652f1f37ad1584be105ae4
mmarif added this to the 3.3.0 milestone 2020-10-15 09:54:42 +00:00
mmarif self-assigned this 2020-10-15 09:54:45 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#103
No description provided.