Skip to content
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

Remove tr #850

Merged
4 commits merged into from
Aug 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autohotkey/tools/config_editor.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ WinWaitActive Config Editor

Click right 120 230 ; Right click a folder in the tree
Sleep 500
Send Click 175 215
Click 175 215
WinWaitActive Delete
Send {Enter}
WinWaitActive Config Editor
Expand Down
16 changes: 8 additions & 8 deletions autohotkey/tools/test_runner.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ Sleep 500
Click 630 70 ; Start Test Suite
Sleep 5000

Click 64 40 ; Script Menu
Click 100 40 ; Script Menu
Sleep 500
Click 64 128 ; Toggle Debug TR-9
Click 100 128 ; Toggle Debug TR-9
Sleep 500
Send puts $manual{Enter} ; TR-16
Sleep 1000
Expand All @@ -108,25 +108,25 @@ Click 630 70 ; Start Test Suite
Sleep 5000
Click 680 195 ; Retry
Sleep 1000
Click 65 40 ; Script
Click 100 40 ; Script
Sleep 500
Click 65 65 ; Test Results Message
Click 100 65 ; Test Results Message
WinWaitActive Test Results
Sleep 1000
Send QA Approves{Enter}
WinWaitActive Test Runner
Sleep 500
Click 65 40 ; Script
Click 100 40 ; Script
Sleep 500
Click 65 86 ; Script Message
Click 100 86 ; Script Message
WinWaitActive Script Message
Sleep 1000
Send SQA Approves{Enter}
WinWaitActive Test Runner
Sleep 500
Click 65 40 ; Script
Click 100 40 ; Script
Sleep 500
Click 65 108 ; Show Call Stack
Click 100 108 ; Show Call Stack
WinWaitActive Call Stack
Sleep 1000
Send {Esc}
Expand Down
4 changes: 2 additions & 2 deletions lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def initialize(parent, type, target_name, packet_name)
top_layout = Qt::HBoxLayout.new
text_layout = Qt::VBoxLayout.new

title_label = Qt::Label.new(tr(title))
title_label = Qt::Label.new(title)
text_layout.addWidget(title_label)
@packet_time = Qt::Label.new("Packet Time: ")
text_layout.addWidget(@packet_time)
Expand All @@ -68,7 +68,7 @@ def initialize(parent, type, target_name, packet_name)
top_layout.addLayout(text_layout)
top_layout.addStretch(1)

button = Qt::PushButton.new(tr("Pause"))
button = Qt::PushButton.new("Pause")
top_layout.addWidget(button)
button.connect(SIGNAL('clicked()')) do
if button.text == "Pause"
Expand Down
56 changes: 28 additions & 28 deletions lib/cosmos/gui/dialogs/details_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,51 +41,51 @@ def initialize(parent, target_name, packet_name, item_name)
# Creates and populates the layout for the dialog
def build_details_layout(item, cmd_tlm)
details_layout = Qt::FormLayout.new
details_layout.addRow("Bit Offset:", Qt::Label.new(tr("#{show_nil(item.bit_offset)}")))
details_layout.addRow("Bit Size:", Qt::Label.new(tr("#{show_nil(item.bit_size)}")))
details_layout.addRow("Data Type:", Qt::Label.new(tr("#{show_data_type(item.data_type)}")))
details_layout.addRow("Array Size:", Qt::Label.new(tr("#{show_nil(item.array_size)}")))
details_layout.addRow("Bit Offset:", Qt::Label.new("#{show_nil(item.bit_offset)}"))
details_layout.addRow("Bit Size:", Qt::Label.new("#{show_nil(item.bit_size)}"))
details_layout.addRow("Data Type:", Qt::Label.new("#{show_data_type(item.data_type)}"))
details_layout.addRow("Array Size:", Qt::Label.new("#{show_nil(item.array_size)}"))
if cmd_tlm == :CMD
if item.range
details_layout.addRow("Minimum:", Qt::Label.new(tr(item.range.first.to_s)))
details_layout.addRow("Maximum:", Qt::Label.new(tr(item.range.last.to_s)))
details_layout.addRow("Minimum:", Qt::Label.new(item.range.first.to_s))
details_layout.addRow("Maximum:", Qt::Label.new(item.range.last.to_s))
end
details_layout.addRow("Default:", Qt::Label.new(tr("#{show_nil(item.default)}"))) if item.default
details_layout.addRow("Default:", Qt::Label.new("#{show_nil(item.default)}")) if item.default
end
details_layout.addRow("Format String:", Qt::Label.new(tr("#{show_nil(item.format_string)}")))
details_layout.addRow("Read_Conversion:", Qt::Label.new(tr("#{show_conversion(item.read_conversion)}")))
details_layout.addRow("Write_Conversion:", Qt::Label.new(tr("#{show_conversion(item.write_conversion)}")))
details_layout.addRow("Id Value:", Qt::Label.new(tr("#{show_nil(item.id_value)}")))
details_layout.addRow("Description:", Qt::Label.new(tr("#{show_nil(item.description)}")))
details_layout.addRow("Units Full:", Qt::Label.new(tr("#{show_nil(item.units_full)}")))
details_layout.addRow("Units Abbreviation:", Qt::Label.new(tr("#{show_nil(item.units)}")))
details_layout.addRow("Endianness:", Qt::Label.new(tr("#{show_endianness(item.endianness)}")))
details_layout.addRow("Format String:", Qt::Label.new("#{show_nil(item.format_string)}"))
details_layout.addRow("Read_Conversion:", Qt::Label.new("#{show_conversion(item.read_conversion)}"))
details_layout.addRow("Write_Conversion:", Qt::Label.new("#{show_conversion(item.write_conversion)}"))
details_layout.addRow("Id Value:", Qt::Label.new("#{show_nil(item.id_value)}"))
details_layout.addRow("Description:", Qt::Label.new("#{show_nil(item.description)}"))
details_layout.addRow("Units Full:", Qt::Label.new("#{show_nil(item.units_full)}"))
details_layout.addRow("Units Abbreviation:", Qt::Label.new("#{show_nil(item.units)}"))
details_layout.addRow("Endianness:", Qt::Label.new("#{show_endianness(item.endianness)}"))
if item.states
details_layout.addRow(build_states_details(item))
else
details_layout.addRow("States:", Qt::Label.new(tr("None")))
details_layout.addRow("States:", Qt::Label.new("None"))
end
if cmd_tlm == :CMD
details_layout.addRow("Required:", Qt::Label.new(tr(item.required.to_s)))
details_layout.addRow("Required:", Qt::Label.new(item.required.to_s))
else
limits = item.limits.values
if limits
details_layout.addRow(build_limits_details(limits))
else
details_layout.addRow(tr("Limits:"), Qt::Label.new("None"))
details_layout.addRow("Limits:", Qt::Label.new("None"))
end
if limits || item.state_colors
details_layout.addRow(tr("Limits Checking Enabled:"), Qt::Label.new(tr("#{show_nil(item.limits.enabled)}")))
details_layout.addRow("Limits Checking Enabled:", Qt::Label.new("#{show_nil(item.limits.enabled)}"))
end
if limits
details_layout.addRow(tr("Limits Persistence Setting:"), Qt::Label.new(tr("#{show_nil(item.limits.persistence_setting)}")))
details_layout.addRow(tr("Limits Persistence Count:"), Qt::Label.new(tr("#{show_nil(item.limits.persistence_count)}")))
details_layout.addRow("Limits Persistence Setting:", Qt::Label.new("#{show_nil(item.limits.persistence_setting)}"))
details_layout.addRow("Limits Persistence Count:", Qt::Label.new("#{show_nil(item.limits.persistence_count)}"))
end
if item.meta.empty?
details_layout.addRow(tr("Meta:"), Qt::Label.new("None"))
details_layout.addRow("Meta:", Qt::Label.new("None"))
else
item.meta.each do |key, value|
details_layout.addRow(tr("Meta[#{key}]:"), Qt::Label.new(value.to_s))
details_layout.addRow("Meta[#{key}]:", Qt::Label.new(value.to_s))
end
end
end
Expand All @@ -94,7 +94,7 @@ def build_details_layout(item, cmd_tlm)

# Create the states details layout
def build_states_details(item)
states_details = Qt::GroupBox.new(tr("States"))
states_details = Qt::GroupBox.new("States")
scroll_layout = Qt::VBoxLayout.new
states_details.setLayout(scroll_layout)
scroll_area = Qt::ScrollArea.new
Expand All @@ -106,9 +106,9 @@ def build_states_details(item)
scroll_widget.setLayout(states_layout)
item.states.sort {|a, b| a[1] <=> b[1]}.each do |state_name, state_value|
if item.state_colors
states_layout.addRow(tr("#{state_name}:"), Qt::Label.new(tr("#{state_value} #{item.state_colors[state_name]}")))
states_layout.addRow("#{state_name}:", Qt::Label.new("#{state_value} #{item.state_colors[state_name]}"))
else
states_layout.addRow(tr("#{state_name}:"), Qt::Label.new(tr("#{state_value}")))
states_layout.addRow("#{state_name}:", Qt::Label.new("#{state_value}"))
end
end
# Figure out the how big the states layout wants to be and set the
Expand All @@ -124,7 +124,7 @@ def build_states_details(item)

# Create the limits details layout
def build_limits_details(limits)
limits_details = Qt::GroupBox.new(tr("Limits"))
limits_details = Qt::GroupBox.new("Limits")
@limits_layout = Qt::FormLayout.new
limits.each do |limits_set_name, limits_settings|
if limits_settings[4] && limits_settings[5]
Expand All @@ -133,7 +133,7 @@ def build_limits_details(limits)
label = Qt::Label.new("RL/#{limits_settings[0]} YL/#{limits_settings[1]} YH/#{limits_settings[2]} RH/#{limits_settings[3]}")
end
@limits_labels[limits_set_name] = label
@limits_layout.addRow(tr("#{limits_set_name}:"), label)
@limits_layout.addRow("#{limits_set_name}:", label)
end
limits_details.setLayout(@limits_layout)
limits_details
Expand Down
2 changes: 1 addition & 1 deletion lib/cosmos/gui/dialogs/exception_list_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(message, exception_list, title = 'COSMOS Exception List', parent
@list = Qt::ListWidget.new
@exception_list.each_with_index do |exception, index|
string = "#{index + 1}. #{exception.class} : #{exception.message}"
Qt::ListWidgetItem.new(tr(string), @list)
Qt::ListWidgetItem.new(string, @list)
end
layout.addWidget(@list)
@list.connect(SIGNAL('itemSelectionChanged ()')) do
Expand Down
6 changes: 3 additions & 3 deletions lib/cosmos/gui/dialogs/find_replace_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def initialize
def create_input_layout
input_layout = Qt::FormLayout.new
@find_box = Qt::LineEdit.new
input_layout.addRow(tr("Fi&nd what:"), @find_box)
input_layout.addRow("Fi&nd what:", @find_box)
@replace_box = Qt::LineEdit.new
replace_label = Qt::Label.new(tr("Re&place with:"))
replace_label = Qt::Label.new("Re&place with:")
replace_label.setBuddy(@replace_box)
@replace_items << replace_label
input_layout.addRow(replace_label, @replace_box)
Expand Down Expand Up @@ -141,7 +141,7 @@ def create_direction_widget
direction_layout.addWidget(@up)
direction_layout.addWidget(down)
direction_layout.addStretch
direction = Qt::GroupBox.new(tr("Direction"))
direction = Qt::GroupBox.new("Direction")
direction.setLayout(direction_layout)
direction
end
Expand Down
4 changes: 2 additions & 2 deletions lib/cosmos/gui/dialogs/interface_raw_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ def initialize(parent, interface)
top_layout = Qt::HBoxLayout.new
text_layout = Qt::VBoxLayout.new

title_label = Qt::Label.new(tr(title))
title_label = Qt::Label.new(title)
text_layout.addWidget(title_label)
@read_raw_data_time = Qt::Label.new("Read Raw Data Time: ")
text_layout.addWidget(@read_raw_data_time)
top_layout.addLayout(text_layout)
top_layout.addStretch(1)

button = Qt::PushButton.new(tr("Pause"))
button = Qt::PushButton.new("Pause")
top_layout.addWidget(button)
button.connect(SIGNAL('clicked()')) do
if button.text == "Pause"
Expand Down
20 changes: 10 additions & 10 deletions lib/cosmos/gui/dialogs/tlm_details_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def initialize(parent, target_name, packet_name, item_name, packet = nil)
setWindowTitle("#{@target_name} #{@packet_name} #{@item_name} Details")

layout = Qt::VBoxLayout.new
layout.addWidget(Qt::Label.new(tr("#{target_name} #{packet_name} #{item_name}")))
layout.addWidget(Qt::Label.new("#{target_name} #{packet_name} #{item_name}"))

# Display the item values
item_values = Qt::GroupBox.new(tr("Item Values"))
item_values = Qt::GroupBox.new("Item Values")

values_layout = Qt::FormLayout.new
@raw_value = Qt::LineEdit.new
@raw_value.setReadOnly(true)
values_layout.addRow(tr("Raw Value:"), @raw_value)
values_layout.addRow("Raw Value:", @raw_value)
@hex_raw_value = nil
@hex_raw_num_digits = 0
case item.data_type
Expand All @@ -67,21 +67,21 @@ def initialize(parent, target_name, packet_name, item_name, packet = nil)
@hex_raw_value = Qt::LineEdit.new
@hex_raw_value.setReadOnly(true)
@hex_raw_num_digits = (((item.bit_size - 1) / 8) + 1) * 2
values_layout.addRow(tr("Hex Raw Value:"), @hex_raw_value)
values_layout.addRow("Hex Raw Value:", @hex_raw_value)
end
end
@converted_value = Qt::LineEdit.new
@converted_value.setReadOnly(true)
values_layout.addRow(tr("Converted Value:"), @converted_value)
values_layout.addRow("Converted Value:", @converted_value)
@formatted_value = Qt::LineEdit.new
@formatted_value.setReadOnly(true)
values_layout.addRow(tr("Formatted Value:"), @formatted_value)
values_layout.addRow("Formatted Value:", @formatted_value)
@formatted_with_units_value = Qt::LineEdit.new
@formatted_with_units_value.setReadOnly(true)
values_layout.addRow(tr("Formatted with Units Value:"), @formatted_with_units_value)
values_layout.addRow("Formatted with Units Value:", @formatted_with_units_value)
@limits_state = Qt::LineEdit.new
@limits_state.setReadOnly(true)
values_layout.addRow(tr("Limits State:"), @limits_state)
values_layout.addRow("Limits State:", @limits_state)

item_values.setLayout(values_layout)
layout.addWidget(item_values)
Expand All @@ -101,7 +101,7 @@ def initialize(parent, target_name, packet_name, item_name, packet = nil)
end

# Display the item details
item_details = Qt::GroupBox.new(tr("Item Details"))
item_details = Qt::GroupBox.new("Item Details")
item_details.setLayout(build_details_layout(item, :TLM))
layout.addWidget(item_details)

Expand Down Expand Up @@ -159,7 +159,7 @@ def update_limits_details(limits_settings, limits_set)
elsif @limits_layout
label = Qt::Label.new(label_text)
@limits_labels[limits_set] = label
@limits_layout.addRow(tr("#{limits_set}:"), label)
@limits_layout.addRow("#{limits_set}:", label)
end
end

Expand Down
20 changes: 10 additions & 10 deletions lib/cosmos/gui/qt_tool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,17 @@ def config_path(filename, type, tool_name)
# placed in the File menu and must be manually added by the user. The
# about_action is added to the Help menu by {#initialize_help_menu}.
def initialize_actions
@exit_action = Qt::Action.new(Cosmos.get_icon('close.png'), tr('E&xit'), self)
@exit_keyseq = Qt::KeySequence.new(tr('Ctrl+Q'))
@exit_action = Qt::Action.new(Cosmos.get_icon('close.png'), 'E&xit', self)
@exit_keyseq = Qt::KeySequence.new('Ctrl+Q')
@exit_action.shortcut = @exit_keyseq
@exit_action.statusTip = tr('Exit the application')
@exit_action.statusTip = 'Exit the application'
connect(@exit_action, SIGNAL('triggered()'), self, SLOT('close()'))

@about_action = Qt::Action.new(Cosmos.get_icon('help.png'), tr('&About'), self)
@about_action.statusTip = tr('About the application')
@about_action = Qt::Action.new(Cosmos.get_icon('help.png'), '&About', self)
@about_action.statusTip = 'About the application'
connect(@about_action, SIGNAL('triggered()'), self, SLOT('about()'))
@documentation_action = Qt::Action.new(tr('&Documentation'), self)
@documentation_action.statusTip = tr('COSMOS Online Documentation')
@documentation_action = Qt::Action.new('&Documentation', self)
@documentation_action.statusTip = 'COSMOS Online Documentation'
self.connect(@documentation_action, SIGNAL('triggered()')) do
Qt::DesktopServices.openUrl(Qt::Url.new("http://cosmosrb.com"))
end
Expand All @@ -137,7 +137,7 @@ def target_dirs_action(menu, default_dirs, target_sub_dir, callback, status_tip
default_dirs = [default_dirs] unless default_dirs.is_a? Array
default_dirs.each do |default_dir|
default_context = default_dir.split('/')[-2..-1].join('/')
action = Qt::Action.new(tr(default_context), self)
action = Qt::Action.new(default_context, self)
action.statusTip = status_tip if status_tip
action.connect(SIGNAL('triggered()')) { callback.call(default_dir) }
menu.addAction(action)
Expand All @@ -156,7 +156,7 @@ def target_dirs_action(menu, default_dirs, target_sub_dir, callback, status_tip
else
name = "#{target_name}/#{target_sub_dir}"
end
action = Qt::Action.new(tr(name), self)
action = Qt::Action.new(name, self)
action.statusTip = status_tip if status_tip
action.connect(SIGNAL('triggered()')) { callback.call(dir) }
menu.addAction(action)
Expand All @@ -167,7 +167,7 @@ def target_dirs_action(menu, default_dirs, target_sub_dir, callback, status_tip
# Creates the Help menu and adds the about_action to it. Thus this MUST be
# called after initialize_actions.
def initialize_help_menu
@help_menu = menuBar().addMenu(tr('&Help'))
@help_menu = menuBar().addMenu('&Help')
@help_menu.addAction(@about_action)
@help_menu.addAction(@documentation_action)
end
Expand Down
12 changes: 6 additions & 6 deletions lib/cosmos/gui/text/ruby_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ def line_at_point(point)
end

def create_add_breakpoint_action(point)
action = Qt::Action.new(tr("Add Breakpoint"), self)
action.statusTip = tr("Add a breakpoint at this line")
action = Qt::Action.new("Add Breakpoint", self)
action.statusTip = "Add a breakpoint at this line"
action.connect(SIGNAL('triggered()')) do
line_at_point(point) do |line|
add_breakpoint(line)
Expand All @@ -454,8 +454,8 @@ def create_add_breakpoint_action(point)
end

def create_clear_breakpoint_action(point)
action = Qt::Action.new(tr("Clear Breakpoint"), self)
action.statusTip = tr("Clear an existing breakpoint at this line")
action = Qt::Action.new("Clear Breakpoint", self)
action.statusTip = "Clear an existing breakpoint at this line"
action.connect(SIGNAL('triggered()')) do
line_at_point(point) do |line|
clear_breakpoint(line)
Expand All @@ -466,8 +466,8 @@ def create_clear_breakpoint_action(point)
end

def create_clear_all_breakpoints_action
action = Qt::Action.new(tr("Clear All Breakpoints"), self)
action.statusTip = tr("Clear all existing breakpoints")
action = Qt::Action.new("Clear All Breakpoints", self)
action.statusTip = "Clear all existing breakpoints"
action.connect(SIGNAL('triggered()')) do
clear_breakpoints
emit breakpoints_cleared
Expand Down
Loading