Closed Xapitonov closed 4 weeks 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
}
}
ОК 🤝
чт, 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: @.***>
Does not translate to the bottom button bar Render/Edit
Russian language (text) ~Вид/Код~ Обзор/Текст