-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Hard-coded strings to string.xml and Add Chinese Simplified Translation #27
Conversation
Note: Some removal of "import" code is automatically by IDE and not on purpose, review carefully |
You did alot of work, I appreciate it, Thanks! before merging, can you guide me to understand it better; how can a user change these translations? like there isnt any toggle button in settings right now from where users can choose translation(I think a toggle button will be better from where we can list the available translations and can save in shared preferences). And also for adding more translations in future, how can we do that, by editing which files? |
Yeah a lot of works and actually I open this PR too early (Toast message is not yet done), there will be one more commit to finish translation In fact FadCam is not prepared for i18n at the begining, all strings is hard-coded into source code. So what I have done is just replace them and made it to point to string.xml (default is at app\src\main\res\values) How I introduce a new Language? In android, the toggle of Language change depends on the Language setting of the user, if display language of system is Chinese, then the app will switch to Chinese if strings in 'zh-rCN' is available After Android 13 user actually can set certain app to display certain language, as far as I know another app translated by me support such function (not app supported but it just open a setting page offered by Android) You can have a look: https://github.com/DP-Hridayan/aShellYou |
*There will be 1-2 commit(s) for toast message, I will comment when I done |
Ok nice, but in future can we make such feature so this same translation will work with a toggle too instead of phone settings? |
The translation is alomst done and ready for merge
not hard but you have to change your coding habit like avoid using hard coded strings like .setMessage("Are you sure you want to delete this video?") better way is to add a string called "dialog_del_notice" in string.xml and then .setMessage(context.getString(R.string.dialog_del_notice)) It will be much easier for translators to do their job |
Oh by the way I have a feature request: notification In China most of the Android System we use is heavily modified and behave differently about background apps, the last time I use FadCam I noticed that the video record failed because the system froze the FadCam and limit its access to camera from background ("Highly dangerous and privacy violating behaviour"). So you can enable user to send a notification when recording a video to keep background alive Although it costs invisibility but still worth since that enhance the reliablity of FadCam |
Yeah thanks for suggestions, btw I'm not an Android developer but still i managed to develop this so i added everything hardcoded for easiness. I just ignored the same msg in android studio at that time but from now on I'll do it the right way. :) Thanks again for investing so much time in helping me out, thats a really great contribution! Will merge the code in some time, and new release with credits will be in some hours. |
Oh i received two more requests for this same issue. (see #20 (comment)) |
Also you can open a bug issue for this or if not, i will do it myself. |
I will open a issue and make a detailed description tomorrow |
I find what the "broken" video actually is —— it is a watermark-failed video. It may caused by half way stop when FadCam is watermarking it |
But for that i have designed it like if for some reason the app gets killed or stopped then the original video will still be there with a temp_ prefix. And if the watermarking is done till end then the temp_ video will be deleted and watermark one will be there with a FADCAM_ prefix. So wasn't there the temp_ video? It must be there as it don't delete if the returncode from the watermarking method isn't OK. |
Yes the "temp" one is kept so I think what I encounter is not a issue but a mis-kill actually. I will not open a bug issue Maybe you can add a option in setting to allow user to get notified about the watermarking progress |
Just to confirm, can you explain how actually the app stopped watermarking? I will add new feature to show the remaining time or a notification to show during watermarking process so it can solve this issue i guess. And the issue of notifications is still there so we have to fix these 2 issues, i will open issue for this. |
I record for abt 25min(background and screen off). The temp video is fine. I stopped recording and then exit FadCam using "back" nav button. Maybe no long after that FadCam got killed by system. Also I test for another several time finding this issue happens very randomly |
I was busy in making my other project so this one got delayed, will merge soon. I was working on a window app (https://github.com/anonfaded/FadCrypt) |
Thank you for your nice app and I add Chinese Language into it
Also to enable it for translation, I made some modification to layout xmls and some java file so please carefully review it to so if these are OK
P.S. Changelog is left in English
here's some screenshot