jan-mate / Journalize

A fast-to-use android journaling app
GNU General Public License v3.0
6 stars 1 forks source link

Return English language (text) Default #2

Closed Xapitonov closed 4 weeks ago

Xapitonov commented 1 month ago

Does not translate to the bottom button bar Render/Edit

Russian language (text) ~Вид/Код~ Обзор/Текст

Screenshot_2024-09-25-23-23-56-447_com.example.journal.jpg

Screenshot_2024-09-25-23-24-12-628_com.example.journal.jpg

Screenshot_2024-09-25-23-24-29-979_com.example.journal.jpg

jan-mate commented 1 month ago

I didn't expect people would translate the app, so I did a lot of hardcoding, sry :/ I might make the app translatable in future. For now, if you want a quick fix to make your fork work with russian, you can change 2 lines in app/src/main/java/com/example/journal/MarkdownUtils.kt , simply change the "Edit" and "Render" to your russian translation

fun toggleRenderMode(context: Context, isEditMode: Boolean, editText: EditText, renderedTextView: TextView, renderButton: Button): Boolean {
        return if (isEditMode) {
            renderMarkdown(context, editText.text.toString(), renderedTextView)
            renderButton.text = "Edit" // Change this
            editText.visibility = View.GONE
            renderedTextView.visibility = View.VISIBLE
            KeyboardUtils.hideKeyboard(context, renderButton)
            false
        } else {
            editText.visibility = View.VISIBLE
            renderedTextView.visibility = View.GONE
            renderButton.text = "Render" // Change this
            KeyboardUtils.showKeyboard(context, editText)
            true
        }
    }
Xapitonov commented 1 month ago

ОК 🤝

чт, 26 сент. 2024 г., 17:49 jan-mate @.***>:

I didn't expect people would translate the app, so I did a lot of hardcoding, sry :/ I might make the app translatable in future. For now, if you want a quick fix to make your fork work with russian, you can change 2 lines in app/src/main/java/com/example/journal/MarkdownUtils.kt , simply change the "Edit" and "Render" to your russian translation

fun toggleRenderMode(context: Context, isEditMode: Boolean, editText: EditText, renderedTextView: TextView, renderButton: Button): Boolean { return if (isEditMode) { renderMarkdown(context, editText.text.toString(), renderedTextView) renderButton.text = "Edit" // Change this editText.visibility = View.GONE renderedTextView.visibility = View.VISIBLE KeyboardUtils.hideKeyboard(context, renderButton) false } else { editText.visibility = View.VISIBLE renderedTextView.visibility = View.GONE renderButton.text = "Render" // Change this KeyboardUtils.showKeyboard(context, editText) true } }

— Reply to this email directly, view it on GitHub https://github.com/jan-mate/Journalize/issues/2#issuecomment-2377033444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV7Z72IKORJAYMZI6FOPK5DZYQGGPAVCNFSM6AAAAABO3ITOQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZXGAZTGNBUGQ . You are receiving this because you authored the thread.Message ID: @.***>