Skip to content

Commit

Permalink
Update Media translation kit.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Mar 13, 2024
1 parent ecff723 commit f20a904
Showing 1 changed file with 70 additions and 56 deletions.
126 changes: 70 additions & 56 deletions plugins/media/i18n/en/translation_kit_media.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
Context for translations
Translation kit for media plugin.

- This is a copy of the translation file with additional comments
- Please do not edit this file, just edit the translation file(s) media.h and extra.dict
- Please do not translate the comments from this file, they are only added for clarification
Edit and submit this file to add support for your language!

Howto?

CTR_DICT_MEDIA_PLUGIN_ID "_Media" ~ This is just an identifier, please do NOT translate this
1. Translate the phrase between the quotes ("")
2. Check that the number of : in the phrase is the same
3. Every phrase must be unique, no duplicates are allowed
4. You may not use a phrase that is part of the core dictionary*
5. You may not use spaces in the translation, but you can use a thin space if you like "jump height:".
6. The order of the : must remain the same "add:to:" cannot be translated with "to:add:"
7. You may not put two : after each other ("blahblah::" is not allowed)
8. If a phrase consists of just one character, its translation must also be just one character
9. Please do not use the following symbols in your translation: { } ( ) , ≔ ↲
10.Please do not start your translation with a digit
11.Please do not use quotes in your translation
12.Please do not include an end-of-line symbol as part of your translation (most of the time this is a dot)
13.Please do not other UTF-8 character you like, not just ASCII (so you can use Chinese characters etc)

* I will check this for you after submitting the file
If you want, you can check this yourself as well, look at i18n/
folder in the Citrine source code.

After you are finished, send the file to me.
I will try to create a Citrine version with it that can run the Media Plugin,
so you can write apps and games in your own language.
If there is something wrong with the file, I will contact you.


Part 1: Objects

In Citrine, you write a program by sending messages to objects.
The Media Plugin adds the following objects to the world of Citrine:

CTR_DICT_NETWORK_OBJECT "Network" ~ The Object representing the Internet and/or local Network
CTR_DICT_COLOR_OBJECT "Color" ~ The Object that represents the concept of a color
CTR_DICT_POINT_OBJECT "Point" ~ The Object that represents a point in space visually
Expand All @@ -15,84 +42,71 @@ CTR_DICT_AUDIO_OBJECT "Audio" ~ The Object that rep
CTR_DICT_SOUND_OBJECT "Sound" ~ The Object that represents a sound like boom!
CTR_DICT_MUSIC_OBJECT "Music" ~ The Object that represents a piece of music that can be played back
CTR_DICT_PACKAGE_OBJECT "Package" ~ The Object that represents an archive that may contain assets for your app or game
CTR_DICT_SCREEN "screen:" ~ Displays something on the screen (i.e. in the window)
CTR_DICT_CLIPBOARD "clipboard" ~ Retrieves the contents of the clipboard
CTR_DICT_ON_STEP "step" ~ Takes a single step in the game, a cycle

Part 2: Events

Event handlers are blocks of code that can be attached to events that happen during
the app or game. Citrine will notify you about these events and you can attach tasks to
them. These tasks will then execute upon the event.

CTR_DICT_ON_STEP "step" ~ Event handler for each single step in the game
CTR_DICT_ON_KEY_UP "key:" ~ Event handler for key up
CTR_DICT_ON_KEY_DOWN "key down:" ~ Event handler for key down
CTR_DICT_ON_TIMER "timer:" ~ Event handler for time-based events
CTR_DICT_ON_GAMEPAD_DOWN "gamepad down:" ~ Event handler for gamepad button down
CTR_DICT_ON_GAMEPAD_UP "gamepad:" ~ Event handler for gamepad button up
CTR_DICT_ON_GAMEPAD_DOWN "gamepad down:" ~ Event handler for gamepad/joystick/gamekey button down
CTR_DICT_ON_GAMEPAD_UP "gamepad:" ~ Event handler for gamepad/joystick/gamekey button up
CTR_DICT_ON_CLICK "click" ~ Event handler for clicks/touches on an image
CTR_DICT_ON_HOVER "hover:" ~ Event handler for hovering over an image
CTR_DICT_ON_CLICK_XY "click x:y:" ~ Event handler for click/touch on certain position on screen
CTR_DICT_STOP_AT_SET "destination:" ~ Event handler called when image reaches destination x/y
CTR_DICT_COLLISION_SET "collision:" ~ Event handler for collisions of active images
CTR_DICT_ON_EVENT "event:" ~ Event handler for other/misc/future events


Part 3: Messages

Message can be send to objects to make them do things.

CTR_DICT_SCREEN "screen:" ~ Displays something on the screen (i.e. in the window)
CTR_DICT_CLIPBOARD "clipboard" ~ Retrieves the contents of the clipboard
CTR_DICT_TIMER_SET "timer:after:" ~ Sets a timer (that will cause a timer event) like settimeout in js
CTR_DICT_LINK_SET "link:" ~ Connects to a Package to retrieve assets from there instead of using disk files
CTR_DICT_SAY_SET "say:" ~ To send text to the text-to-speech synthesizer

The "link:" command can also be used to connect to a system library, to access
functionality outside of Citrine. The general idea is that you 'link' or 'connect' to
a certain file to extract functions or other resources.

CTR_DICT_SAY_SET "say:" ~ Sends text to a pre-configured text-to-speech synthesizer
CTR_DICT_SELECTION "select" ~ Returns the selected text in an editable image that can function as a text field
CTR_DICT_FETCH_TEXT_MESSAGES "text messages" ~ Retrieves text messages from the network
CTR_DICT_SEND_TEXT_MESSAGE "text:to:" ~ Sends a single text message to an IP or other type of address over the network
CTR_DICT_NETWORK_PORT "network port" ~ To change the network port using Program setting
CTR_DICT_SEND_TO_SET "send:to:" ~ Sends/returns data over network (Network send: "blah" to: "POST https://...")
CTR_DICT_DIGRAPH_LIGATURE_SET "digraph:ligature:" ~ Converts characters specified as Digraph to a single UTF-8 code point ligature
CTR_DICT_RED "red" ~ Returns the amount of red in a Color
CTR_DICT_GREEN "green" ~ Returns the amount of green in a Color
CTR_DICT_BLUE "blue" ~ Returns the amount of blue in a Color
CTR_DICT_TRANSPARENCY "transparency" ~ Returns the amount of transparency/alpha in a Color
CTR_DICT_RED_GREEN_BLUE_SET "red:green:blue:" ~ Creates a new color by setting the amount of red, green and blue
CTR_DICT_TRANSPARENCY "transparency:" ~ Sets the transparancy of an image
CTR_DICT_IMAGE_SET "image:" ~ Sets the image / updates the image
CTR_DICT_CONTROLLABLE "controllable:" ~ Makes the image controllable by joystick/keys/gamepad 1/Yes = top-down/platform 2=Horizontal 3=Vertical 4=Radius-style
CTR_DICT_SOLID_SET "solid:" ~ Toggles the solidness of an image in a game
CTR_DICT_ACTIVE_SET "active:" ~ Toggles event activation of an image in a game (whether events are fired)
CTR_DICT_GRAVITY_SET "gravity:" ~ Sets the gravity of an image
CTR_DICT_SPEED_SET "speed:" ~ Sets the motion speed of an image
CTR_DICT_FRICTION_SET "friction:" ~ Sets the friction level of an image
CTR_DICT_COLLISION_SET "collision:" ~ Event handler for collisions of active images
CTR_DICT_ON_CLICK "click" ~ Event handler for clicks on an image
CTR_DICT_ON_HOVER "hover:" ~ Event handler for hovering over an image
CTR_DICT_ANIMATIONS_SET "animations:" ~ Sets the number of sub images in a single image to perform animation
CTR_DICT_CUT "deselect" ~ Deselects text in an editable image that functions as a text field
CTR_DICT_CUT "cut" ~ Cuts selected text an editable image that functions as a text field
CTR_DICT_EDITABLE_SET "editable:" ~ Toggles editability of an image, if Yes then you can write text in the image
CTR_DICT_FONT_TYPE_SIZE_SET "font:size:" ~ Sets the font and size for an image
CTR_DICT_COLOR_SET "color:" ~ Sets the color of the text in an image
CTR_DICT_BACKGROUND_COLOR_SET "background color:" ~ Sets the background color
CTR_DICT_DRAW_COLOR_SET "draw:color:" ~ Sets the color for drawing on an image
CTR_DICT_FROM "from" ~ Beginning of a line
CTR_DICT_TO "to" ~ End of a line
CTR_DICT_ACCELERATE_SET "accelerate:" ~ Sets acceleration of an image
CTR_DICT_JUMPHEIGHT_SET "jump height:" ~ Sets the jump height of an image
CTR_DICT_BOUNCE_SET "bounce:" ~ Toggles whether an image bounces or not
CTR_DICT_STOP_AT_SET "destination:" ~ Event handler called when image reaches destination x/y
CTR_DICT_AUDIO_PLAY "play" ~ Plays music or sound
CTR_DICT_AUDIO_SILENCE "silence" ~ Stops music or sound
CTR_DICT_AUDIO_REWIND "rewind" ~ Rewinds music
CTR_DICT_XY_SET "x:y:" ~ Set image on x/y
CTR_DICT_ALIGN_XY_SET "align x:y:" ~ Align text in image on x/y
CTR_DICT_MOVE_TO_XY_SET "move to x:y:" ~ Moves images to position x/y using specified speed
CTR_DICT_ON_CLICK_XY "click x:y:" ~ Event handler for click on certain position on screen
CTR_DICT_X "x?" ~ Retrieves x position of an image
CTR_DICT_Y "y?" ~ Retrieves y position of an image
CTR_DICT_WEBSITE_SET "website:" ~ Opens the website at the specified address
CTR_DICT_CLIPBOARD_SET "clipboard:" ~ Sets the contents of the clipboard
CTR_DICT_FROM_TO_SET "from:to:" ~ Draws a line between two points
CTR_DICT_RED_GREEN_BLUE_SET "red:green:blue:" ~ Sets the red-green-blue values of a Color
CTR_DICT_TRANSPARENCY_SET "transparency:" ~ Sets the transparency of a Color
CTR_DICT_QUOTES "Quotes" ~ Constant that contains quotation marks (implementation detail)

Context for additional translations:

person ~ image of a person for a demo game
obstacle ~ image of a box or obstacle in a game
lawn ~ green lawn background image for game
sea.png ~ blue sea background for game with boat
bunny ~ image of a rabbit for a platform game
island ~ floating island in a platform game
background ~ background image for platform game
boat ~ boat for game at sea
canvas ~ black background to test drawing on
textfield ~ input field for text
label ~ label next to a text field
button ~ button to click on
output ~ area on the screen where result of calculation appears
surface ~ background for a form or app
scissors ~ pictogram/icon for cut
papers ~ pictogram/icon for copy
broom ~ pictogram/icon for delete
book ~ pictogram/icon for help function
gears ~ pictogram/icon to run the current program
crate ~ pictogram/icon for export to device (phone)
CTR_DICT_WIDTH_HEIGHT "width:height:" ~ Sets the width and height of a media object (camera)



0 comments on commit f20a904

Please sign in to comment.