Module:RosterChangeData/Sentences

local util_table = require("Module:TableUtil")

local tbl = { to_conjugate = { 'ARE', 'BECOME', 'CHANGE', 'CONTRACTS', 'DEPARTURE', 'END', 'EXPIRE', 'LEAVE', 'MOVE', 'POSITION', 'REJOIN', 'RETURN', 'RE_SIGN', 'TRAINEE', 'SUB', 'WINDOW', 'LOAN_NOUN', 'AGENT', },	priority = { 'join', 'join_pickup', 'rejoin', 'from_academy', 'from_sister', 'from_main', 'join_as_sub', 'join_as_temp_sub', 'join_as_trainee', 'loaned_from', 'gcd_loaned_from', 'loan_end_and_join', 'gcd_join', 'gcd_join_as_sub', 'gcd_join_as_temp_sub', 'gcd_from_academy', 'gcd_from_main', 'gcd_main_or_acad', 'confirm_join', 'confirm_join_as_sub', 'confirm_join_as_trainee', 'draft_pick_start', 'draft_pick_to_academy', 'draft_pick_to_sub', 'draft_pick_to_trainee', 'role_swap', 'role_swap_from_ingame', 'role_swap_to_ingame', 'confirm_role_swap', 'to_starting', 'gcd_to_starting', 'loan_return', 'gcd_loan_return', 'to_active', 'gcd_to_active', 'extended', 're_sign', 'gcd_extended', 'to_sub', 'to_inactive', 'gcd_to_inactive', 'to_official_sub', 'gcd_to_official_sub', 'end_official_sub', 'gcd_end_official_sub', 'gcd_role_swap', 'gcd_role_swap_from_ingame', 'gcd_role_swap_to_ingame', 'gcd_to_sub', 'gcd_draft_pick_start', 'remain', 'gcd_draft_pick_to_academy', 'gcd_draft_pick_to_sub', 'draft_pick_expire', 'draft_pick_leave', 'gcd_draft_pick_expire', 'gcd_draft_pick_leave', 'gcd_leave', 'gcd_leave_as_temp_sub', 'opportunities', 'set_to_leave', 'expire_notleave', 'expire', 'gcd_expire_notleave', 'gcd_expire_notleave_yet', 'gcd_expire', 'leave', 'leave_pickup', 'loan_end_and_leave', 'to_main', 'gcd_to_main', 'to_sister', 'to_academy', 'gcd_to_academy', 'loaned_to', 'gcd_loaned_to', 'loan_end', 'gcd_loan_end', 'confirm_leave', },	lookup = { from_academy = { sentence = '$PLAYERS$ $JOIN$ from academy roster.', desc = "Players joining from the org's academy roster", howto = "move_type", respect_joining_key = true, class = "join" }, confirm_from_academy = { sentence = '$PLAYERS_POSS$ joining from academy roster is confirmed.', desc = "Players joining from the org's academy roster", howto = "move_type", respect_joining_key = true, class = "join" }, gcd_from_academy = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the main roster in the GCD.', desc = "Players joining from the org's academy roster", howto = "move_type", respect_joining_key = true, class = "join" }, from_main = { sentence = '$PLAYERS$ $JOIN$ from main roster.', desc = "", howto = "move_type", respect_joining_key = true, class = "join" }, confirm_from_main = { sentence = '$PLAYERS_POSS$ joining from main roster is confirmed.', desc = "", howto = "move_type", respect_joining_key = true, class = "join" }, gcd_from_main = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the academy roster in the GCD.', desc = "Players joining from the org's main roster", howto = "move_type", respect_joining_key = true, class = "join" }, to_sister = { sentence = '$PLAYERS$ $LEAVE$ for sister team $SISTER_TEAM$.', desc = "Players leaving to join another roster (but not main->acad or acad->main)", howto = "Set |move_type=to_sister" }, from_sister = { sentence = '$PLAYERS$ $JOIN$ from sister team $SISTER_TEAM$.', desc = "Players joining from another roster (but not main->acad or acad->main)", howto = "Set |move_type=from_sister", respect_joining_key = true, class = "join" }, gcd_join = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the GCD$AS$.', desc = "Added to GCD but no team announce", howto = "Set |source=GCD and provide |gcd_before and |gcd_after links", auto = true, respect_joining_key = true, class = "join" }, gcd_join_main_or_acad = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the GCD$AS$ to join either main or academy roster.', desc = "Added to the GCD but there's no team announcement and we don't even know if they're joining main or academy", howto = "set |status=main_or_acad in post and use a GCD source. Make team be the main team; this can be changed later if needed. NEVER USE THIS PERMANENTLY!!! ONCE WE KNOW THE DESTINATION, GO BACK AND EDIT THE LINE!!!!!!!", respect_joining_key = true, auto = true, class = "join" }, gcd_to_sub = { sentence = '$PLAYERS$ $ARE$ moved to $SUB$ in the GCD.', desc = "Moved to sub in the GCD but no team announce", howto = "Set |source=GCD and provide |gcd_before and |gcd_after links", auto = true }, confirm_join = { sentence = "$PLAYERS_POSS$ $JOINING$ is confirmed.", desc = "Was already added to GCD and now team announces", howto = "Set |move_type=confirm, and it will auto detect", auto = true, respect_joining_key = true, class = "join" }, gcd_leave = { sentence = "$PLAYERS$ $ARE$ removed from the GCD.", desc = "Removed from GCD but no team announce", howto = "Set |source=GCD and provide |gcd_before and |gcd_after links", auto = true }, gcd_remove_notleave = { sentence = "$PLAYERS$ $ARE$ removed from the GCD but $ARE$ still part of the organization.", desc = "Removed from GCD but no team announce", howto = "Set |source=GCD and provide |gcd_before and |gcd_after links, and also set |move_type=remove_notleave" }, confirm_leave = { sentence = "$PLAYERS_POSS$ $DEPARTURE$ $ARE$ confirmed.", desc = "Was already removed from GCD and now team announces", howto = "Set |move_type=confirm in pre, and it will auto detect", auto = true }, gcd_expire = 'expire', expire = { sentence = "$PLAYERS_POSS$ $CONTRACTS$ $EXPIRE$.", desc = "Player's contract expires", howto = "Set |move_type=expire and no |post=" }, gcd_expire_notleave_yet = { sentence = "$PLAYERS_POSS$ $CONTRACTS$ $EXPIRE$ but departure is not confirmed.", desc = "Player's contract expires, but there is no announcement about departure", howto = "Set |move_type=expire_will_leave and keep the player in post. Use this to make this be used as an actual leave date" }, gcd_expire_notleave = 'expire_notleave', expire_notleave = { sentence = "$PLAYERS_POSS$ $CONTRACTS$ $EXPIRE$ but departure is not confirmed.", desc = "Player's contract expires, but there is no announcement about departure", howto = "Set |move_type=expire and keep the player in post. Using this preload implies the player did not leave the team following the expiration, and instead renewed/became coach/etc. It can retroactively be changed to expire_notleave_yet" }, gcd_extended = 'extended', extended = { sentence = "$PLAYERS_POSS$ $CONTRACTS$ $ARE$ extended$CONTRACT_EXTEND_UNTIL$.", desc = "Player's contract is extended until a date or year", howto = "Set |contract_until= in |post= as a date or year (no text processing will happen on its value). If no date is provided, can set |move_type=" }, join = { sentence = '$PLAYERS$ $JOIN$.', desc = "Standard players joining", howto = "Automatic", auto = true, respect_joining_key = true, class = "join" }, join_as_temp_sub = { sentence = '$PLAYERS$ $JOIN$ as temporary $SUB$ for $PHASE$$EVENT$$REPLACING$$BECAUSE_COMMA$$REASON$.', desc = "A player joins as a temp sub", howto = "|status=temp_sub", auto = true, respect_joining_key = true, class = "join" }, join_after_trial = { sentence = "$PLAYERS$ $JOIN$ after successful trial.", desc = "A player completes their trial and their spot is made permanent", howto = "Set |status=trial in pre", auto = true, class = "join" }, gcd_join_as_temp_sub = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the GCD as temporary $SUB$ for $PHASE$$EVENT$$REPLACING$$BECAUSE_COMMA$$REASON$.', desc = "A player joins as a temp sub", howto = "|status=temp_sub", auto = true, respect_joining_key = true, class = "join" }, leave = { sentence = '$PLAYERS$ $LEAVE$.', desc = "Standard players leaving", howto = "Automatic", auto = true }, leave_as_temp_sub = { sentence = '$PLAYERS$ (temporary $SUB$) $LEAVE$.', desc = "Standard players leaving when before is temp sub", howto = "Automatic", auto = true }, leave_after_trial = { sentence = '$PLAYERS$ $LEAVE$ after unsuccessful trial.', desc = "Player leaves after being on trial", howto = "Set |status=Trial in pre", auto = true }, gcd_leave_as_temp_sub = { sentence = '$PLAYERS$ (temporary $SUB$) $ARE$ removed from the GCD.', desc = "Standard players leaving when before is temp sub", howto = "Automatic", auto = true }, loaned_from = { sentence = '$PLAYERS$ $ARE$ loaned from $LOANED_FROM$.', desc = "", howto = "Set |loaned_from= as the team they're officially on and |status=on_loan", auto = true, class = "join" }, gcd_loaned_from = 'loaned_from', loaned_to = { sentence = '$PLAYERS$ $ARE$ loaned to $LOANED_TO$.', desc = "Players loaned out", howto = "Set |loaned_to= as the team they're temporarily going to and |status=loaned_out", auto = true }, gcd_loaned_to = 'loaned_to', loan_return = { sentence = '$PLAYERS$ $RETURN$ from loan to $LOANED_TO$.', desc = "Players no longer loaned out", howto = "Set |loaned_to= as the team they were loaned to and |status=loaned_out", auto = true }, gcd_loan_return = 'loan_return', loan_return_and_leave = { sentence = '$PLAYERS$ $LEAVE$ after $LOAN_NOUN$ to $LOANED_TO$ $END$.', desc = "Player was loaned out; this loan now ends and they leave", howto = "Set |loaned_to= and |status=loaned_out in pre, with no post" }, gcd_loan_end = 'loan_end', loan_end = { sentence = '$PLAYERS_POSS$ loan from $LOANED_FROM$ $END$.', desc = "Players no longer loaned to this team", howto = "Set |loaned_from= as the team they're coming back to |status=on_loan", auto = true }, loan_end_and_join = { sentence = '$PLAYERS$ $JOIN$ permanently after $LOAN_NOUN$ from $LOANED_FROM$ $END$.', desc = "Player was loaned here; this loan now ends and they leave", howto = "Set |loaned_from as the team they were loaned from, |status=on_loan in pre, and no status in post" }, opportunities = { sentence = '$PLAYERS$ $BECOME$ restricted free $AGENT$.', desc = "", howto = "|status=opportunities", auto = true }, re_sign = { sentence = '$PLAYERS$ $RE_SIGN$.', desc = "Players re-sign with team (as opposed to contract extended)", howto = "move_type" }, remain = { sentence = '$PLAYERS$ will remain with the team$REMAIN_FOR$.', desc = "", howto = "Automatic when |pre= and |post= are identical, can also set |remain_for= and |remain_for_link=" }, role_swap_from_ingame = 'role_swap', role_swap_to_ingame = 'role_swap', role_swap = { sentence = '$PLAYERS_WITH_SWAP$ $CHANGE$ $POSITION$.', desc = "", howto = "Automatic", auto = true }, gcd_role_swap_from_ingame = 'gcd_role_swap', gcd_role_swap_to_ingame = 'gcd_role_swap', gcd_role_swap = { sentence = "$PLAYERS_POSS_WITH_SWAP$ $POSITION$ $ARE$ changed in the GCD.", desc = "", howto = "Automatic when GCD is the source", auto = true }, confirm_role_swap = { sentence = '$PLAYERS_POSS_WITH_SWAP$ $POSITION$ changing is confirmed.', desc = "", howto = "Set |move_type=confirm in pre", auto = true }, set_to_leave = { sentence = '$PLAYERS$ $ARE$ set to leave$LEAVE_DATE$$ASSISTANCE$.', desc = "", howto = "post |status=set_to_leave, can add |assistance=yes optionally", auto = true }, set_to_leave_already_joined = { sentence = '$PLAYERS$ $ARE$ set to leave$LEAVE_DATE$, having already joined $ALREADY_JOINED$.', desc = "", howto = "post |status=set_to_leave with |already_joined set as the name of the new team" }, sub_to_trainee = { sentence = '$PLAYERS$ $MOVE$ from $SUB$ to $TRAINEE$.', desc = "", howto = "Automatic" }, gcd_to_academy = 'to_academy', to_academy = { sentence = '$PLAYERS$ $LEAVE$ for academy roster.', desc = "Players leaving to join the org's academy roster", howto = "move_type" }, gcd_to_academy_also_stay = 'to_academy_also_stay', to_academy_also_stay = { sentence = '$PLAYERS$ $MOVE$ to academy roster.', desc = "Players joining the org's academy roster but NOT leaving main", howto = "Set move_type=to_academy and keep player in post" }, to_active = { sentence = '$PLAYERS$ $BECOME$ active.', desc = "", howto = "Set |status=inactive in |pre=", auto = true, class = "join" }, gcd_to_active = "to_active", to_inactive = { sentence = '$PLAYERS$ $BECOME$ inactive.', desc = "", howto = "Set |status=inactive", auto = true }, gcd_to_inactive = "to_inactive", gcd_to_main = "to_main", to_main = { sentence = '$PLAYERS$ $LEAVE$ for main roster.', desc = "", howto = "move_type" }, gcd_to_main_also_stay = 'to_main_also_stay', to_main_also_stay = { sentence = '$PLAYERS$ $MOVE$ to main roster.', desc = "Player joins the org's main roster but don't leave academy", howto = "Set move_type=to_main and keep player in post" }, gcd_to_starting = 'to_starting', to_starting = { sentence = '$PLAYERS$ $MOVE$ to starting roster.', desc = "", howto = "Set |sub=yes in |pre=", auto = true }, to_sub = { sentence = '$PLAYERS$ $MOVE$ to $SUB$.', desc = "", howto = "Set |sub=yes", auto = true }, to_trainee = { sentence = '$PLAYERS$ $MOVE$ to $TRAINEE$.', desc = "", howto = "Set |trainee=yes", auto = true }, to_official_sub = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the official roster as $SUB$.', desc = "For support staff members who are officially on the roster but obviously won't play", howto = "Set |status=official_sub", auto = true }, end_official_sub = { sentence = '$PLAYERS$ $ARE$ no longer listed on the official roster as $SUB$.', desc = "For support staff members who are officially on the roster but obviously won't play and are now removed", howto = "In pre, set |status=official_sub", auto = true }, gcd_end_official_sub = { sentence = '$PLAYERS$ $ARE$ no longer listed on the official roster as $SUB$ in the GCD.', desc = "For support staff members who are officially on the roster but obviously won't play and are now removed", howto = "In pre, set |status=official_sub", auto = true }, gcd_to_official_sub = { sentence = '$PLAYERS$ $ARE$ $ADDED$ to the official roster as $SUB$ in the GCD.', desc = "For support staff members who are officially on the roster but obviously won't play", howto = "Set |status=official_sub", auto = true }, gcd_draft_pick_expire = 'draft_pick_expire', gcd_draft_pick_leave = 'draft_pick_leave', gcd_draft_pick_start = 'draft_pick_start', gcd_draft_pick_to_sub = 'draft_pick_to_sub', gcd_draft_pick_to_academy = 'draft_pick_to_academy', draft_pick_expire = { sentence = '$PLAYERS_POSS$ draft $WINDOW$ $EXPIRE$.', desc = "If the draft window naturally expires without a signing", howto = 'Set |move_type=expire and |status=draft_pick in pre' }, draft_pick_leave = { sentence = '$PLAYERS_POSS$ draft $WINDOW$ $ARE$ ended early without any signing.', desc = "If the draft window is terminated early", howto = '|status=draft_pick in pre, and no |post or move_type' }, draft_pick_start = { sentence = '$PLAYERS$ $ARE$ drafted$AT_EVENT$$DRAFT_WINDOW_UNTIL$.', desc = "Team chooses to draft a player or players", howto = '|status=draft_pick in post, set |event= to specify event' }, draft_pick_to_trainee = { sentence = '$PLAYERS$ $ARE$ signed during draft window as $TRAINEE$.', desc = "", howto = 'Automatic' }, draft_pick_to_sub = { sentence = '$PLAYERS$ $ARE$ signed during draft window as $SUB$.', desc = "", howto = 'Automatic' }, draft_pick_to_academy = { sentence = '$PLAYERS$ $ARE$ signed during draft window and will play for the Academy team.', desc = 'player "leaves" the main roster and joins Academy (use normal join for the academy join line)', howto = "Set move_type=to_academy" }, unknown = { sentence = '$PLAYERS$ UNKNOWN ACTION', desc = "", howto = "Error fallback, don't use" }, } }

tbl.priority = util_table.hash(tbl.priority)

-- allow value to lead to another key for k, v in pairs(tbl.lookup) do	if type(v) == 'string' then tbl.lookup[k] = mw.clone(tbl.lookup[v]) end end

return tbl