usbong / UsbongKit

A framework for reading and displaying contents of Usbong Trees
www.usbong.ph
Apache License 2.0
2 stars 1 forks source link

textFieldWithAnswer does not get translated #12

Closed masarapmabuhay closed 7 years ago

masarapmabuhay commented 7 years ago

Salut! I noticed that textFieldWithAnswer does not get translated even if there is a translation available in the trans folder.

screen shot 2016-10-27 at 9 05 02 am
 <task-node name="textFieldWithAnswer~@audioName=question3~3. How do you read these kanji characters (紙, 髪, 神)?Answer=kami|Kami|かみ|カミ">
        <transition to="imageTextDisplay~correct~@audioName=correct~Correct!{br}Yes, the correct answer is: かみ, カミ, kami." name="Yes"></transition>
        <transition to="imageTextDisplay~incorrect~@audioName=incorrect~3~Incorrect!{br}The correct answer is: かみ, カミ, kami." name="No"></transition>   
    </task-node>    

Merci beaucoup!

masarapmabuhay commented 7 years ago

Bonnes nouvelles! Good news! I was able to fix this issue. I added translateText(parseText(...)) in // Rejoin.

screen shot 2016-10-27 at 9 32 39 am
 case .TextFieldWithAnswer, .TextAreaWithAnswer:
                let separator = "Answer="
                var components = finalText.componentsSeparatedByString(separator)

                // Get answer
                if components.count > 1 {
                    currentTargetTextInput = components.removeLast()
                }

                // Rejoin
                let text: String = translateText(parseText(components.joinWithSeparator(separator)))

                // Create TextField or TextArea depending on taskNodeType
                node = (taskNodeType == .TextFieldWithAnswer) ? TextFieldNode(text: text) : TextAreaNode(text: text)

How do I then send a pull request to merge our code via Xcode?

Merci beaucoup!

chrisamanse commented 7 years ago

If you open UsbongKit with SourceTree, you can create a new branch then commit your changes. After committing the necessary changes, you can now push this branch to this GitHub repo. Now that your branch is visible in GitHub, you can create a pull request from that branch.

masarapmabuhay commented 7 years ago

Salut! Merci beaucoup pour ta réponse! D'accord! How about if I want to use Xcode to commit changes and create a pull request like what you do?

chrisamanse commented 7 years ago

I use the Terminal for git operations, and GitHub for GitHub operations (pull requests, issues, etc.).

It is possible to use Xcode for git operations. The operations can be found in Source Control in the menu bar of Xcode (it contains commit, push, pull, discard changes, etc.).

chrisamanse commented 7 years ago

I use the Terminal for git operations, and GitHub for GitHub operations (pull requests, issues, etc.).

It is possible to use Xcode for git operations. The operations can be found in Source Control in the menu bar (contains commit, push, pull, discard changes, etc.).

On Oct 26 2016, at 20:18, Masarap Mabuhay notifications@github.com wrote:

Salut! Merci beaucoup pour ta réponse! D'accord! How about if I want to use Xcode to commit changes and create a pull request like what you do?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/usbong/UsbongKit/issues/12#issuecomment-256536534, or mute the thread https://github.com/notifications/unsubscribe-auth/ALtXUh_VUr5RpukHMDr76CWm73eTTNDVks5q4BgcgaJpZM4Kh1tF.

masarapmabuhay commented 7 years ago

Salut! Merci beaucoup pour ton conseil! Unfortunately, while I was testing Xcode to do git operations, I messed up: my code reverted back to an earlier version. It seems that the UsbongKit in the LIKHA-Guide is not updated. I'm now redoing most, but not all, of the steps again. Toutefois, je ferais de mon mieux! Merci!

masarapmabuhay commented 7 years ago

Salut! I have committed the updates to UsbongKit (iOS)-master branch. I went with using SourceTree, instead of Xcode or Terminal. I also merged your translate-tasks branch to master. Shall I also merge your disable-sleep branch to master?