Skip to content

Instantly share code, notes, and snippets.

YU-TANG yu-tang

  • Tokyo, Japan
Block or report user

Report or block yu-tang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yu-tang
yu-tang / ja.lua
Last active May 24, 2019
ZeroBrane Studio Japanese language file
View ja.lua
--- @author Yu Tang
--- @date 2019/05/24
return {
["%s event failed: %s"] = "%s イベントの処理に失敗しました: %s", -- src\editor\package.lua
["%s%% formatted..."] = "フォーマット中(%s%%)...", -- src\editor\print.lua
["%s%% loaded..."] = "読込中(%s%%)...", -- src\editor\commands.lua
["&About"] = "ZeroBrane Studio について(&A)", -- src\editor\menu_help.lua
["&Add Watch"] = "ウォッチ式の追加(&A)", -- src\editor\debugger.lua
["&Break"] = "ブレーク(&B)", -- src\editor\menu_project.lua
["&Close Page"] = "このページを閉じる(&C)", -- src\editor\gui.lua, src\editor\menu_file.lua
@yu-tang
yu-tang / extract_Menu_Item_Code.groovy
Created May 21, 2017
extract a Menu Item Code from a Bundle key
View extract_Menu_Item_Code.groovy
final String key = "TF_MENU_TOOLS_STATISTICS_STANDARD"
final String localized = removeMnemonicMarker(org.omegat.util.OStrings.getString(key))
String removeMnemonicMarker(String text) {
text.replace("&", "")
}
console.println """\
key: $key
localized: $localized"""
@yu-tang
yu-tang / set_caret_at_segment_tail_end.groovy
Created May 5, 2017
Set caret position at the segment tail end when goto previous segment
View set_caret_at_segment_tail_end.groovy
package me.goat.groovy.scripting.tailedcaret
import javax.swing.SwingUtilities
import org.omegat.core.Core
import org.omegat.core.CoreEvents
import org.omegat.core.data.SourceTextEntry
import org.omegat.core.events.IEntryEventListener
import org.omegat.gui.editor.Document3
import org.omegat.util.gui.UIThreadsUtil
@yu-tang
yu-tang / bold_font_to_plain_for_editor.groovy
Last active Oct 16, 2017
Make the bold font to plain in the source of active segment
View bold_font_to_plain_for_editor.groovy
/* :name=Make the bold font to plain in the source of active segment
*
* Usage: move this script to
* <your-scripts-folder>/application_startup/ sub-folder
* for event driven automatically execution.
*
* @author Yu Tang
* @date 2017-04-07
* @version 0.2.1
*/
@yu-tang
yu-tang / display_segment_at_the_bottom.groovy
Created Mar 12, 2017
Display segment at the bottom of the Editor when you activate new segment
View display_segment_at_the_bottom.groovy
/* :name=Display segment at the bottom :description=Display segment at the bottom of the Editor when you activate new segment
*
* Usage: move this script to
* <your-scripts-folder>/entry_activated/ sub-folder
* for event driven automatically execution.
*
* @author Yu Tang
* @date 2017-03-12
* @version 0.1.0
*/
View activate_source_text.groovy
/* :name=Activate source text :description=Activate source text on the Editor with keyboard shortcut
*
* The workaround by script for RFE #821:
* Showing cursor on the original segment
* http://sourceforge.net/p/omegat/feature-requests/821/
*
* @author Yu Tang
* @author Kos Ivantsov
* @date 2016-10-24
* @version 1.1.1
@yu-tang
yu-tang / exec_cmd_and_reload.groovy
Last active Dec 27, 2015
Execute External Command and Reload
View exec_cmd_and_reload.groovy
/* :name=Execute External Command and Reload :description=Execute External Command and Reload Current Project
* @author Yu Tang
* @date 2015-12-27
* @version 0.2
*/
def command = /C:\Program Files (x86)\microsoft office\OFFICE11\WINWORD.EXE/
import javax.swing.SwingUtilities
import static javax.swing.JOptionPane.*
@yu-tang
yu-tang / toggleShowHideBottomAutoHideButtonPanel.groovy
Created Nov 12, 2015
Toggle show/hide bottom AutoHideButtonPanel for OmegaT
View toggleShowHideBottomAutoHideButtonPanel.groovy
/* :name=Toggle show/hide bottom AutoHideButtonPanel :description=Toggle show/hide bottom AutoHideButtonPanel
*
* Note: I don't know about any side effect associated with hiding the panel. Use at your own risk.
*
* @author Yu Tang
* @date 2015-11-12
* @version 0.1
*/
mainWindow.desktop.bottomBorderPane.with {visible = !visible}
@yu-tang
yu-tang / TraverseAndReplace.groovy
Last active Oct 29, 2015
Traverse each descendant file in the directory tree and replaces all occurrences.
View TraverseAndReplace.groovy
/**
* Usage : Put this script in <ScriptsDir>/project_changed folder. Create a folder if it doesn't exists.
*
* @author Yu Tang
* @version 0.2
*/
import static org.omegat.core.events.IProjectEventListener.PROJECT_CHANGE_TYPE.*
// prepare
@yu-tang
yu-tang / update_link.groovy
Last active Oct 16, 2015
Update old Sourceforge links in changes.txt
View update_link.groovy
You can’t perform that action at this time.