Skip to content

Commit

Permalink
revert json files in shared-data, move to app and components
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Jan 16, 2025
1 parent 5e8417a commit 7e45853
Show file tree
Hide file tree
Showing 12 changed files with 190 additions and 14 deletions.
3 changes: 1 addition & 2 deletions app/src/assets/localization/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { protocolCommandTextEn as protocol_command_text } from '@opentrons/shared-data'

import shared from './shared.json'
import anonymous from './anonymous.json'
import app_settings from './app_settings.json'
Expand Down Expand Up @@ -29,6 +27,7 @@ import run_details from './run_details.json'
import top_navigation from './top_navigation.json'
import error_recovery from './error_recovery.json'
import incompatible_modules from './incompatible_modules.json'
import protocol_command_text from './protocol_command_text.json'

export const en = {
anonymous,
Expand Down
2 changes: 1 addition & 1 deletion app/src/assets/localization/zh/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { protocolCommandTextZh as protocol_command_text } from '@opentrons/shared-data'
import shared from './shared.json'
import anonymous from './anonymous.json'
import app_settings from './app_settings.json'
Expand Down Expand Up @@ -28,6 +27,7 @@ import run_details from './run_details.json'
import top_navigation from './top_navigation.json'
import error_recovery from './error_recovery.json'
import incompatible_modules from './incompatible_modules.json'
import protocol_command_text from './protocol_command_text.json'

export const zh = {
anonymous,
Expand Down
5 changes: 4 additions & 1 deletion components/src/assets/localization/en/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { protocolCommandTextEn as protocol_command_text } from '@opentrons/shared-data'
import protocol_command_text from './protocol_command_text.json'

// i18n files needed for unit testing. this is the quick fix for now until we figure out
// one source of truth for sharing the protocol_command_text
// translation across multiple projects
export const en = {
protocol_command_text,
}
100 changes: 100 additions & 0 deletions components/src/assets/localization/en/protocol_command_text.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"absorbance_reader_close_lid": "Closing Absorbance Reader lid",
"absorbance_reader_initialize": "Initializing Absorbance Reader to perform {{mode}} measurement at {{wavelengths}}",
"absorbance_reader_open_lid": "Opening Absorbance Reader lid",
"absorbance_reader_read": "Reading plate in Absorbance Reader",
"adapter_in_mod_in_slot": "{{adapter}} on {{module}} in Slot {{slot}}",
"adapter_in_slot": "{{adapter}} in Slot {{slot}}",
"air_gap_in_place": "Air gapping {{volume}} µL",
"all_nozzles": "all nozzles",
"aspirate": "Aspirating {{volume}} µL from well {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} µL/sec",
"aspirate_in_place": "Aspirating {{volume}} µL in place at {{flow_rate}} µL/sec ",
"blowout": "Blowing out at well {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} µL/sec",
"blowout_in_place": "Blowing out in place at {{flow_rate}} µL/sec",
"closing_tc_lid": "Closing Thermocycler lid",
"column_layout": "column layout",
"comment": "Comment",
"configure_for_volume": "Configure {{pipette}} to aspirate {{volume}} µL",
"configure_nozzle_layout": "Configure {{pipette}} to use {{layout}}",
"confirm_and_resume": "Confirm and resume",
"deactivate_hs_shake": "Deactivating shaker",
"deactivate_temperature_module": "Deactivating Temperature Module",
"deactivating_hs_heater": "Deactivating heater",
"deactivating_tc_block": "Deactivating Thermocycler block",
"deactivating_tc_lid": "Deactivating Thermocycler lid",
"degrees_c": "{{temp}}°C",
"detect_liquid_presence": "Detecting liquid presence in well {{well_name}} of {{labware}} in {{labware_location}}",
"disengaging_magnetic_module": "Disengaging Magnetic Module",
"dispense": "Dispensing {{volume}} µL into well {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} µL/sec",
"dispense_in_place": "Dispensing {{volume}} µL in place at {{flow_rate}} µL/sec",
"dispense_push_out": "Dispensing {{volume}} µL into well {{well_name}} of {{labware}} in {{labware_location}} at {{flow_rate}} µL/sec and pushing out {{push_out_volume}} µL",
"drop_tip": "Dropping tip in {{well_name}} of {{labware}}",
"drop_tip_in_place": "Dropping tip in place",
"dropping_tip_in_trash": "Dropping tip in {{trash}}",
"engaging_magnetic_module": "Engaging Magnetic Module",
"fixed_trash": "Fixed Trash",
"home_gantry": "Homing all gantry, pipette, and plunger axes",
"in_location": "in {{location}}",
"latching_hs_latch": "Latching labware on Heater-Shaker",
"left": "Left",
"load_labware_to_display_location": "Load {{labware}} {{display_location}}",
"load_liquids_info_protocol_setup": "Load {{liquid}} into {{labware}}",
"load_module_protocol_setup": "Load {{module}} in Slot {{slot_name}}",
"load_pipette_protocol_setup": "Load {{pipette_name}} in {{mount_name}} Mount",
"module_in_slot": "{{module}} in Slot {{slot_name}}",
"module_in_slot_plural": "{{module}}",
"move_labware": "Move Labware",
"move_labware_manually": "Manually move {{labware}} from {{old_location}} to {{new_location}}",
"move_labware_on": "Move labware on {{robot_name}}",
"move_labware_using_gripper": "Moving {{labware}} using gripper from {{old_location}} to {{new_location}}",
"move_relative": "Moving {{distance}} mm along {{axis}} axis",
"move_to_addressable_area": "Moving to {{addressable_area}}",
"move_to_addressable_area_drop_tip": "Moving to {{addressable_area}}",
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
"move_to_slot": "Moving to Slot {{slot_name}}",
"move_to_well": "Moving to well {{well_name}} of {{labware}} in {{labware_location}}",
"multiple": "multiple",
"notes": "notes",
"off_deck": "off deck",
"offdeck": "offdeck",
"on_location": "on {{location}}",
"opening_tc_lid": "Opening Thermocycler lid",
"pause": "Pause",
"pause_on": "Pause on {{robot_name}}",
"partial_layout": "partial layout",
"pickup_tip": "Picking up tip(s) from {{well_range}} of {{labware}} in {{labware_location}}",
"prepare_to_aspirate": "Preparing {{pipette}} to aspirate",
"reloading_labware": "Reloading {{labware}}",
"return_tip": "Returning tip to {{well_name}} of {{labware}} in {{labware_location}}",
"right": "Right",
"row_layout": "row layout",
"save_position": "Saving position",
"set_and_await_hs_shake": "Setting Heater-Shaker to shake at {{rpm}} rpm and waiting until reached",
"setting_hs_temp": "Setting Target Temperature of Heater-Shaker to {{temp}}",
"setting_temperature_module_temp": "Setting Temperature Module to {{temp}} (rounded to nearest integer)",
"setting_thermocycler_block_temp": "Setting Thermocycler block temperature to {{temp}} with hold time of {{hold_time_seconds}} seconds after target reached",
"setting_thermocycler_lid_temp": "Setting Thermocycler lid temperature to {{temp}}",
"single": "single",
"single_nozzle_layout": "single nozzle layout",
"slot": "Slot {{slot_name}}",
"target_temperature": "target temperature",
"tc_awaiting_for_duration": "Waiting for Thermocycler profile to complete",
"tc_run_profile_steps": "Temperature: {{celsius}}°C, hold time: {{duration}}",
"tc_starting_extended_profile": "Running thermocycler profile with {{elementCount}} total steps and cycles:",
"tc_starting_extended_profile_cycle": "{{repetitions}} repetitions of the following steps:",
"tc_starting_profile": "Running thermocycler profile with {{stepCount}} steps:",
"touch_tip": "Touching tip",
"trash_bin": "Trash Bin",
"trash_bin_in_slot": "Trash Bin in {{slot_name}}",
"turning_rail_lights_off": "Turning rail lights off",
"turning_rail_lights_on": "Turning rail lights on",
"unlatching_hs_latch": "Unlatching labware on Heater-Shaker",
"wait_for_duration": "Pausing for {{seconds}} seconds. {{message}}",
"wait_for_resume": "Pausing protocol",
"waiting_for_hs_to_reach": "Waiting for Heater-Shaker to reach target temperature",
"waiting_for_tc_block_to_reach": "Waiting for Thermocycler block to reach target temperature and holding for specified time",
"waiting_for_tc_lid_to_reach": "Waiting for Thermocycler lid to reach target temperature",
"waiting_to_reach_temp_module": "Waiting for Temperature Module to reach {{temp}}",
"waste_chute": "Waste Chute",
"with_reference_of": "with reference of {{wavelength}} nm"
}
5 changes: 4 additions & 1 deletion components/src/assets/localization/zh/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { protocolCommandTextZh as protocol_command_text } from '@opentrons/shared-data'
import protocol_command_text from './protocol_command_text.json'

// i18n files needed for unit testing. this is the quick fix for now until we figure out
// one source of truth for sharing the protocol_command_text
// translation across multiple projects
export const zh = {
protocol_command_text,
}
80 changes: 80 additions & 0 deletions components/src/assets/localization/zh/protocol_command_text.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"adapter_in_mod_in_slot": "{{adapter}}在{{slot}}的{{module}}上",
"adapter_in_slot": "{{adapter}}在{{slot}}上",
"aspirate": "从{{labware_location}}的{{labware}}的{{well_name}}孔中以{{flow_rate}}µL/秒的速度吸液{{volume}}µL",
"aspirate_in_place": "在原位以{{flow_rate}}µL/秒的速度吸液{{volume}}µL",
"blowout": "在{{labware_location}}的{{labware}}的{{well_name}}孔中以{{flow_rate}}µL/秒的速度排空",
"blowout_in_place": "在原位以{{flow_rate}}µL/秒的速度排空",
"closing_tc_lid": "关闭热循环仪热盖",
"comment": "解释",
"configure_for_volume": "配置{{pipette}}以吸液{{volume}}µL",
"configure_nozzle_layout": "配置{{pipette}}以使用{{amount}}个通道",
"confirm_and_resume": "确认并继续",
"deactivate_hs_shake": "停用震荡功能",
"deactivate_temperature_module": "停用温控模块",
"deactivating_hs_heater": "停用加热功能",
"deactivating_tc_block": "停用热循环仪温控功能",
"deactivating_tc_lid": "停用热循环仪热盖功能",
"degrees_c": "{{temp}}°C",
"detect_liquid_presence": "正在检测{{labware}}在{{labware_location}}中的{{well_name}}孔中的液体存在",
"disengaging_magnetic_module": "下降磁力架模块",
"dispense_push_out": "以{{flow_rate}}µL/秒的速度将{{volume}}µL 排液至{{labware_location}}的{{labware}}的{{well_name}}孔中,并推出{{push_out_volume}}µL",
"dispense": "以{{flow_rate}}µL/秒的速度将{{volume}}µL 排液至{{labware_location}}的{{labware}}的{{well_name}}孔中",
"dispense_in_place": "在原位以{{flow_rate}}µL/秒的速度排液{{volume}}µL",
"drop_tip": "将吸头丢入{{labware}}的{{well_name}}孔中",
"drop_tip_in_place": "在原位丢弃吸头",
"engaging_magnetic_module": "抬升磁力架模块",
"fixed_trash": "垃圾桶",
"home_gantry": "复位所有龙门架、移液器和柱塞轴",
"latching_hs_latch": "在热震荡模块上锁定实验耗材",
"left": "",
"load_liquids_info_protocol_setup": "将{{liquid}}加载到{{labware}}中",
"load_module_protocol_setup": "在甲板槽{{slot_name}}中加载模块{{module}}",
"load_pipette_protocol_setup": "在{{mount_name}}支架上加载{{pipette_name}}",
"module_in_slot_plural": "{{module}}",
"module_in_slot": "{{module}}在{{slot_name}}号板位",
"move_labware_manually": "手动将{{labware}}从{{old_location}}移动到{{new_location}}",
"move_labware_on": "在{{robot_name}}上移动实验耗材",
"move_labware_using_gripper": "使用转板抓手将{{labware}}从{{old_location}}移动到{{new_location}}",
"move_labware": "移动实验耗材",
"move_relative": "沿{{axis}}轴移动{{distance}}毫米",
"move_to_coordinates": "移动到 (X:{{x}}, Y:{{y}}, Z:{{z}})",
"move_to_slot": "移动到{{slot_name}}号板位",
"move_to_well": "移动到{{labware_location}}的{{labware}}的{{well_name}}孔",
"move_to_addressable_area": "移动到{{addressable_area}}",
"move_to_addressable_area_drop_tip": "移动到{{addressable_area}}",
"notes": "备注",
"off_deck": "甲板外",
"offdeck": "甲板外",
"opening_tc_lid": "打开热循环仪热盖",
"pause_on": "在{{robot_name}}上暂停",
"pause": "暂停",
"pickup_tip": "从{{labware_location}}的{{labware}}的{{well_range}}孔中拾取吸头",
"prepare_to_aspirate": "准备使用{{pipette}}吸液",
"reloading_labware": "正在重新加载{{labware}}",
"return_tip": "将吸头返回到{{labware_location}}的{{labware}}的{{well_name}}孔中",
"right": "",
"save_position": "保存位置",
"set_and_await_hs_shake": "设置热震荡模块以{{rpm}}rpm 震动并等待达到该转速",
"setting_hs_temp": "将热震荡模块的目标温度设置为{{temp}}",
"setting_temperature_module_temp": "将温控模块设置为{{temp}}(四舍五入到最接近的整数)",
"setting_thermocycler_block_temp": "将热循环仪加热块温度设置为{{temp}},并在达到目标后保持{{hold_time_seconds}}秒",
"setting_thermocycler_lid_temp": "将热循环仪热盖温度设置为{{temp}}",
"slot": "板位{{slot_name}}",
"target_temperature": "目标温度",
"tc_awaiting_for_duration": "等待热循环仪程序完成",
"tc_run_profile_steps": "温度:{{celsius}}°C,时间:{{seconds}}秒",
"tc_starting_profile": "热循环仪开始进行由以下步骤组成的{{repetitions}}次循环:",
"trash_bin_in_slot": "垃圾桶在{{slot_name}}",
"touch_tip": "吸头接触内壁",
"turning_rail_lights_off": "正在关闭导轨灯",
"turning_rail_lights_on": "正在打开导轨灯",
"unlatching_hs_latch": "解锁热震荡模块上的实验耗材",
"wait_for_duration": "暂停{{seconds}}秒。{{message}}",
"wait_for_resume": "暂停协议",
"waiting_for_hs_to_reach": "等待热震荡模块达到目标温度",
"waiting_for_tc_block_to_reach": "等待热循环仪加热块达到目标温度并保持指定时间",
"waiting_for_tc_lid_to_reach": "等待热循环仪热盖达到目标温度",
"waiting_to_reach_temp_module": "等待温控模块达到{{temp}}",
"waste_chute": "外置垃圾槽"
}
1 change: 0 additions & 1 deletion shared-data/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ export * from './liquidClasses'
export * from './modules'
export * from './pipettes'
export * from './protocols'
export * from './sharedLocalizations'
export * from './titleCase'
export * from './types'
3 changes: 0 additions & 3 deletions shared-data/js/sharedLocalizations/en/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions shared-data/js/sharedLocalizations/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions shared-data/js/sharedLocalizations/zh/index.ts

This file was deleted.

0 comments on commit 7e45853

Please sign in to comment.