Difference between revisions of "Template talk:Honor desc/es"
(→More changes: new section) |
|||
(21 intermediate revisions by 3 users not shown) | |||
Line 19: | Line 19: | ||
:::::::I am planning to check every Advanced honor to be sure it correctly links back with the prereq template. [[User:JadeDragon|JadeDragon]] ([[User talk:JadeDragon|talk]]) 21:30, 17 November 2014 (EST) | :::::::I am planning to check every Advanced honor to be sure it correctly links back with the prereq template. [[User:JadeDragon|JadeDragon]] ([[User talk:JadeDragon|talk]]) 21:30, 17 November 2014 (EST) | ||
::::::You are correct in that the Camping Skills series are not prerequisites of each other. Therefore, they are not really priority. But there are some honors that in English are titled (honor) and (honor - advanced), such as Computers, where they are prerequisites but their Spanish counterparts were named differently, using Roman numerals. I don't know exactly why the original translators decided to do that with the names, but it's the way things are. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 21:36, 17 November 2014 (EST) | ::::::You are correct in that the Camping Skills series are not prerequisites of each other. Therefore, they are not really priority. But there are some honors that in English are titled (honor) and (honor - advanced), such as Computers, where they are prerequisites but their Spanish counterparts were named differently, using Roman numerals. I don't know exactly why the original translators decided to do that with the names, but it's the way things are. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 21:36, 17 November 2014 (EST) | ||
+ | |||
+ | SPD is also using the I, II system but we just ignored those names and stuck with the GC system. Can ya do that? The http://www.investitureachievement.org/wiki/index.php/Adventist_Youth_Honors_Answer_Book/Recreation/Abseiling series has a similar issue - Advanced should really link up to Instructor level in the honor box, although technically you can become an instructor without doing the advanced level. [[User:JadeDragon|JadeDragon]] ([[User talk:JadeDragon|talk]]) 21:42, 17 November 2014 (EST) | ||
+ | :The SPD naming system can be ignored because there exists other variations in the same language and this site is specifically for NAD. In Spanish, however, these are indeed their official names. It also goes back to the issue of the NAD not wanting anything changed from their requirements, which probably includes the honor names as well. I have not heard from them yet on what they'd like to do with the Spanish versions, and I know that they can take a loooooong time to respond. | ||
+ | |||
+ | ::What about using the Honor Sequels template in Spanish? It is supposed to cover the Advanced and any other sequential honor anyway. Not sure how it is controlled though. I just found [[Adventist_Youth_Honors_Answer_Book/Nature/Antelopes|Antelopes]] does not show Antelopes - Advanced in the Sequels box? Maybe we could set the words Honor Sequels bigger and bolder too. [[User:JadeDragon|JadeDragon]] ([[User talk:JadeDragon|talk]]) 22:04, 17 November 2014 (EST) | ||
+ | :::This was of the issues we addressed on my user talk page, that has to do with the See Also template found inside the Honor_Desc template. It's another problematic translation we're trying to find a solution for. -- [[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:32, 17 November 2014 (EST) | ||
+ | :::Ideally, though, the See Also template could be a fix, if figured out how to make it work. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:34, 17 November 2014 (EST) | ||
+ | |||
+ | So a few months have gone by and I'm still not sure on how to proceed with this. Any thought or suggestions that might have sprung during these months on how to go about this? --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 01:58, 3 July 2015 (EDT) | ||
+ | :Thanks for bringing it up again - I had forgotten! There are a couple of extensions I can install to help with this, but it is still a very challenging problem. The first handles regular expressions (which is a very powerful matching/find/replace construct used in a ''lot'' of places in the computing industry). The second is a roman numeral extension which is not nearly as helpful as one might wish, since it only supports one-way conversions (arabic to roman). If it supported both, it'd be a lot simpler, as adding one with arabic numerals is substantially easier than with the roman counterparts. That precludes the "convert-to-arabic, add one, convert back" approach. I might skip that all together and try to just do it with regex and case statements. To make it easier, I will limit roman numerals to 0-9. Not sure when I can get to it or how long it will take once I start. We'll see! --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 10:38, 3 July 2015 (EDT) | ||
+ | ::Great! We'll see which extension works better then. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 11:08, 3 July 2015 (EDT) | ||
+ | :::I have installed the extension, and have proven to myself that this can be done - but now I'm having second thoughts about whether that is going to fix the underlying problem. The pagename will still be "AYHAB/Category/Name - Advanced/es" because it is a translation of "AYHAB/Category/Name - Advanced". The page title already gets translated, so that should include the Roman numeral rather than the "Advanced". The template is checking that the page exists, and to do that, I would check the pagename, not the page title. So all of that ''should'' still work. If it does not, I am not convinced that detecting the next Roman numeral is going to fix it. Can you point me to a page where this is a problem? --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 10:23, 5 July 2015 (EDT) | ||
+ | ::::OK, I see that I do have some work ahead of me for that. It will find the link to the page, but right now it uses that link as the page title. I can fix that. --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 10:51, 5 July 2015 (EDT) | ||
+ | :::::I tried it on Computers. You'll have to change the honorname argument on all the basic honors to "Honor I" for it to work, but I think that's OK? The code looks for a name ending with a Roman numeral and increments it. It should work until level VIII->IX, but that should be sufficient! --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 10:57, 5 July 2015 (EDT) | ||
+ | ::::I see that you changed the Computers to Roman numerals and it worked to go to the advanced level. I noticed that it worked for Communications also but not for any other one, such as the Camping Skills, First Aid, Accounting or Swimming series. Is there something that is missing in their descriptors that it does not catch it? | ||
+ | ::::We cannot put Roman numerals on all the basic levels for the same reason they cannot be put on their English version: it does not correspond to the correct name. I reverted the edit for the Roman numerals because there are many more honors that have the advanced name in it than there are Roman numerals and I do not feel comfortable changing the name of all the basic levels just yet. | ||
+ | ::::There must be a way to keep the «avanzado» name and switch to the Roman numeral when appropriate. Kind of like a function that says «if exists, do this, unless this exists, then do this». Would it work to put another ifexist template inside and include the Roman numeral template? --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:13, 5 July 2015 (EDT) | ||
+ | |||
+ | ifexist won't work because it works on the pagename, not on the honorname. The pagename is AYHAB/Category/Honor/es, and you can think of it as the document's file name. If we need to support a mix of «avanzado» and Roman numerals, I'll need to think about it a bit more. We should change Honor desc/es back to the way it was until then. --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 22:19, 5 July 2015 (EDT) | ||
+ | :To support sequences with more than two honors we're going to need an entirely different approach. We can't just look for Honor - Advanced. We will need to add an argument to the Honor desc template that let's us ''tell'' it what the next honor is, as well as its name. The default can be for it to work the old way, but if the argument is specified, it won't concoct a pagename/link - it will straight-up use the argument ''as'' the pagename/link (and another as the name). --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 22:40, 5 July 2015 (EDT) | ||
+ | ::I was thinking the same thing. We'll probably have to add an argument. If this is the case, then I don't think it would be a big deal because there are not many honors that have the Roman numerals. Just a few series in Spanish and I think only the camping series in English. | ||
+ | ::I do think the extension you added is brilliant and I'm sure there is a way to use it, I just can't put my finger on it right now.--[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:47, 5 July 2015 (EDT) | ||
+ | ::BTW, the correct names for the Computer honors in Spanish is with the - Advanced format. The Computer series from the SAD is the one that uses the Roman numerals -- I think there are five in that series; I haven't put them up yet. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:51, 5 July 2015 (EDT) | ||
+ | |||
+ | == Empty Arguments or No Argument Switch == | ||
+ | |||
+ | I am trying to understand what I can do for this to show up in the in the right Category page. I am looking specifically at this block of code: | ||
+ | |||
+ | <nowiki>[[Category:Adventist Youth Honors Answer Book/Skill Level {{{skill|{{#switch:{{{skill}}} | ||
+ | | Desconocido = Unknown | ||
+ | }}}}}/es|{{{sortkey|{{{honorname}}}}}}]]</nowiki> | ||
+ | |||
+ | <br /> | ||
+ | |||
+ | <nowiki>[[Category:Adventist Youth Honors Answer Book/Honors Introduced in {{{year|{{#switch:{{{year}}} | ||
+ | | Desconocido = Unknown | ||
+ | }}}}}/es|{{{sortkey|{{{honorname}}}}}}]]</nowiki> | ||
+ | |||
+ | Basically, if there is a skill argument, that will show up. What I'm not getting is what to do so it can redirect the page to the correct Category page when it is unknown. I put in a switch function so that it can switch to the English word and redirect it properly. The issue is I can't put the skill or year argument because there wouldn't be one. What can I put instead? A space? Is there another type of argument I'm supposed to use? --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 22:57, 6 July 2015 (EDT) | ||
+ | |||
+ | :You need to specify the default case. In a switch statement, the cases look like a=b, which means, "in the case that the variable we're switching on is a, output b as the text." If you omit the a= part, that means, "in the case of none-of-the-above, output b". The default case will catch unspecified variables as well as mis-specified ones. --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 23:04, 6 July 2015 (EDT) | ||
+ | ::Awesome! That worked perfectly. I didn't know about the default case. --[[User:W126jep|w126jep]] ([[User talk:W126jep|talk]]) 00:17, 7 July 2015 (EDT) | ||
+ | |||
+ | == More changes == | ||
+ | |||
+ | I've made two more changes to the English version of this template that we'll probably want to make here too. First, I've changed the table-of-contents/requirements to not be collapsed by default. That was done yesterday. I think we'll want to leave it that way until we can get the requirements pages integrated in. Second, I disabled the autonumbering this evening so the TOC doesn't get the section numbering added twice. --[[User:Jomegat|Jomegat]] ([[User talk:Jomegat|talk]]) 22:36, 8 October 2020 (EDT) |
Latest revision as of 02:36, 9 October 2020
Linking to Advanced Honors
So I'm trying to figure out what to do with Advanced Honor names in Spanish. In Spanish, there are a few honors that belong to a series and the names for the advanced levels are replaced by roman numerals, much like the Camping Skills series. These include the Swimming honors (Natación I-V) and the First Aid Honors (Primeros Auxilios I-II). In the honor_desc template below the category where it says «See also» and then it gives a link to the advanced level, I would like it to display the same in Spanish, but the Spanish name for the advanced level is a roman numeral, instead of «Honor» - Advanced.
The template does not catch it and does not make the link. Ideally, each would link to the next level (Camping Skills I to II, II to III and so on). Any ideas how to go about this? --w126jep (talk) 17:53, 17 November 2014 (EST)
- This would also be good to do for the English versions too, like the Camping Skills series. --w126jep (talk) 17:54, 17 November 2014 (EST)
Working on it. What honors have you translated that have an advanced? --Jomegat (talk) 19:18, 17 November 2014 (EST)
- OK, I found that Backpacking has an advanced, and that you have translated that. But the link does work and goes to the right place. As for the Camping Skills, First Aid, and Swimming honors, those aren't quite the same as "advanced" honors because they do not require the previous honor as a prerequisite. I'm not saying "no", but I am saying that computing the name of the next honor in a roman numeral series will require some... creativity. --Jomegat (talk) 19:25, 17 November 2014 (EST)
- Well, I just came across this issue while working on translating the some of these. The honors with «Avanzado» in their title is not a problem. It is the honors that have Roman numerals, where in English their title is «Advanced», that I'm trying to figure out how to link. It is true, though, that many of them are not really prerequisites of each other (such as the Camping Skills series), but in Spanish, it is the way they were named. -- w126jep (talk) 19:38, 17 November 2014 (EST)
- If you can cite an example, I'd be glad to look at it. --Jomegat (talk) 19:56, 17 November 2014 (EST)
- Well, I haven't gotten to the translations yet, but one example is the Computers honor. In English it is Computers and Computers Advanced. In Spanish it is Computación I and II. The same with Communications. Bookbinding and Accounting are actually titled Contabilidad I and II. The new SAD honors Math Skills and their Computers series all have I-V. -- w126jep (talk) 20:15, 17 November 2014 (EST)
- If Math Skills IV requires Math Skills III as a prerequisite, then we will have a problem. For the others, the template should work as is (as demonstrated by Backpacking and Adv for Christ). I've been experimenting with honor_desc/es2, but I can tell you that linking to a roman numeral successor has proved to be quite challenging, even if the name of the next honor is supplied by a human as one of the arguments. I'll pick it up again in the future (but might need a reminder). --Jomegat (talk) 20:52, 17 November 2014 (EST)
- Well, I haven't gotten to the translations yet, but one example is the Computers honor. In English it is Computers and Computers Advanced. In Spanish it is Computación I and II. The same with Communications. Bookbinding and Accounting are actually titled Contabilidad I and II. The new SAD honors Math Skills and their Computers series all have I-V. -- w126jep (talk) 20:15, 17 November 2014 (EST)
- If you can cite an example, I'd be glad to look at it. --Jomegat (talk) 19:56, 17 November 2014 (EST)
- Well, I just came across this issue while working on translating the some of these. The honors with «Avanzado» in their title is not a problem. It is the honors that have Roman numerals, where in English their title is «Advanced», that I'm trying to figure out how to link. It is true, though, that many of them are not really prerequisites of each other (such as the Camping Skills series), but in Spanish, it is the way they were named. -- w126jep (talk) 19:38, 17 November 2014 (EST)
- I don't think Camping Skills II requires I because it is required for IA and what do you do with the kid that missed Friend? There are a few of the newer Advanced honors that do not specifically require the basic honor but clearly it is expected as you need the basic honor patch for the advanced star. Some other honors are in series without using Advanced, I think of the Wilderness Leadership Honor which is several levels away from basic honors.
- I am planning to check every Advanced honor to be sure it correctly links back with the prereq template. JadeDragon (talk) 21:30, 17 November 2014 (EST)
- You are correct in that the Camping Skills series are not prerequisites of each other. Therefore, they are not really priority. But there are some honors that in English are titled (honor) and (honor - advanced), such as Computers, where they are prerequisites but their Spanish counterparts were named differently, using Roman numerals. I don't know exactly why the original translators decided to do that with the names, but it's the way things are. --w126jep (talk) 21:36, 17 November 2014 (EST)
SPD is also using the I, II system but we just ignored those names and stuck with the GC system. Can ya do that? The http://www.investitureachievement.org/wiki/index.php/Adventist_Youth_Honors_Answer_Book/Recreation/Abseiling series has a similar issue - Advanced should really link up to Instructor level in the honor box, although technically you can become an instructor without doing the advanced level. JadeDragon (talk) 21:42, 17 November 2014 (EST)
- The SPD naming system can be ignored because there exists other variations in the same language and this site is specifically for NAD. In Spanish, however, these are indeed their official names. It also goes back to the issue of the NAD not wanting anything changed from their requirements, which probably includes the honor names as well. I have not heard from them yet on what they'd like to do with the Spanish versions, and I know that they can take a loooooong time to respond.
- What about using the Honor Sequels template in Spanish? It is supposed to cover the Advanced and any other sequential honor anyway. Not sure how it is controlled though. I just found Antelopes does not show Antelopes - Advanced in the Sequels box? Maybe we could set the words Honor Sequels bigger and bolder too. JadeDragon (talk) 22:04, 17 November 2014 (EST)
- This was of the issues we addressed on my user talk page, that has to do with the See Also template found inside the Honor_Desc template. It's another problematic translation we're trying to find a solution for. -- w126jep (talk) 22:32, 17 November 2014 (EST)
- Ideally, though, the See Also template could be a fix, if figured out how to make it work. --w126jep (talk) 22:34, 17 November 2014 (EST)
- What about using the Honor Sequels template in Spanish? It is supposed to cover the Advanced and any other sequential honor anyway. Not sure how it is controlled though. I just found Antelopes does not show Antelopes - Advanced in the Sequels box? Maybe we could set the words Honor Sequels bigger and bolder too. JadeDragon (talk) 22:04, 17 November 2014 (EST)
So a few months have gone by and I'm still not sure on how to proceed with this. Any thought or suggestions that might have sprung during these months on how to go about this? --w126jep (talk) 01:58, 3 July 2015 (EDT)
- Thanks for bringing it up again - I had forgotten! There are a couple of extensions I can install to help with this, but it is still a very challenging problem. The first handles regular expressions (which is a very powerful matching/find/replace construct used in a lot of places in the computing industry). The second is a roman numeral extension which is not nearly as helpful as one might wish, since it only supports one-way conversions (arabic to roman). If it supported both, it'd be a lot simpler, as adding one with arabic numerals is substantially easier than with the roman counterparts. That precludes the "convert-to-arabic, add one, convert back" approach. I might skip that all together and try to just do it with regex and case statements. To make it easier, I will limit roman numerals to 0-9. Not sure when I can get to it or how long it will take once I start. We'll see! --Jomegat (talk) 10:38, 3 July 2015 (EDT)
- Great! We'll see which extension works better then. --w126jep (talk) 11:08, 3 July 2015 (EDT)
- I have installed the extension, and have proven to myself that this can be done - but now I'm having second thoughts about whether that is going to fix the underlying problem. The pagename will still be "AYHAB/Category/Name - Advanced/es" because it is a translation of "AYHAB/Category/Name - Advanced". The page title already gets translated, so that should include the Roman numeral rather than the "Advanced". The template is checking that the page exists, and to do that, I would check the pagename, not the page title. So all of that should still work. If it does not, I am not convinced that detecting the next Roman numeral is going to fix it. Can you point me to a page where this is a problem? --Jomegat (talk) 10:23, 5 July 2015 (EDT)
- OK, I see that I do have some work ahead of me for that. It will find the link to the page, but right now it uses that link as the page title. I can fix that. --Jomegat (talk) 10:51, 5 July 2015 (EDT)
- I tried it on Computers. You'll have to change the honorname argument on all the basic honors to "Honor I" for it to work, but I think that's OK? The code looks for a name ending with a Roman numeral and increments it. It should work until level VIII->IX, but that should be sufficient! --Jomegat (talk) 10:57, 5 July 2015 (EDT)
- I see that you changed the Computers to Roman numerals and it worked to go to the advanced level. I noticed that it worked for Communications also but not for any other one, such as the Camping Skills, First Aid, Accounting or Swimming series. Is there something that is missing in their descriptors that it does not catch it?
- We cannot put Roman numerals on all the basic levels for the same reason they cannot be put on their English version: it does not correspond to the correct name. I reverted the edit for the Roman numerals because there are many more honors that have the advanced name in it than there are Roman numerals and I do not feel comfortable changing the name of all the basic levels just yet.
- There must be a way to keep the «avanzado» name and switch to the Roman numeral when appropriate. Kind of like a function that says «if exists, do this, unless this exists, then do this». Would it work to put another ifexist template inside and include the Roman numeral template? --w126jep (talk) 22:13, 5 July 2015 (EDT)
- OK, I see that I do have some work ahead of me for that. It will find the link to the page, but right now it uses that link as the page title. I can fix that. --Jomegat (talk) 10:51, 5 July 2015 (EDT)
- I have installed the extension, and have proven to myself that this can be done - but now I'm having second thoughts about whether that is going to fix the underlying problem. The pagename will still be "AYHAB/Category/Name - Advanced/es" because it is a translation of "AYHAB/Category/Name - Advanced". The page title already gets translated, so that should include the Roman numeral rather than the "Advanced". The template is checking that the page exists, and to do that, I would check the pagename, not the page title. So all of that should still work. If it does not, I am not convinced that detecting the next Roman numeral is going to fix it. Can you point me to a page where this is a problem? --Jomegat (talk) 10:23, 5 July 2015 (EDT)
- Great! We'll see which extension works better then. --w126jep (talk) 11:08, 3 July 2015 (EDT)
ifexist won't work because it works on the pagename, not on the honorname. The pagename is AYHAB/Category/Honor/es, and you can think of it as the document's file name. If we need to support a mix of «avanzado» and Roman numerals, I'll need to think about it a bit more. We should change Honor desc/es back to the way it was until then. --Jomegat (talk) 22:19, 5 July 2015 (EDT)
- To support sequences with more than two honors we're going to need an entirely different approach. We can't just look for Honor - Advanced. We will need to add an argument to the Honor desc template that let's us tell it what the next honor is, as well as its name. The default can be for it to work the old way, but if the argument is specified, it won't concoct a pagename/link - it will straight-up use the argument as the pagename/link (and another as the name). --Jomegat (talk) 22:40, 5 July 2015 (EDT)
- I was thinking the same thing. We'll probably have to add an argument. If this is the case, then I don't think it would be a big deal because there are not many honors that have the Roman numerals. Just a few series in Spanish and I think only the camping series in English.
- I do think the extension you added is brilliant and I'm sure there is a way to use it, I just can't put my finger on it right now.--w126jep (talk) 22:47, 5 July 2015 (EDT)
- BTW, the correct names for the Computer honors in Spanish is with the - Advanced format. The Computer series from the SAD is the one that uses the Roman numerals -- I think there are five in that series; I haven't put them up yet. --w126jep (talk) 22:51, 5 July 2015 (EDT)
Empty Arguments or No Argument Switch
I am trying to understand what I can do for this to show up in the in the right Category page. I am looking specifically at this block of code:
[[Category:Adventist Youth Honors Answer Book/Skill Level {{{skill|{{#switch:{{{skill}}} | Desconocido = Unknown }}}}}/es|{{{sortkey|{{{honorname}}}}}}]]
[[Category:Adventist Youth Honors Answer Book/Honors Introduced in {{{year|{{#switch:{{{year}}} | Desconocido = Unknown }}}}}/es|{{{sortkey|{{{honorname}}}}}}]]
Basically, if there is a skill argument, that will show up. What I'm not getting is what to do so it can redirect the page to the correct Category page when it is unknown. I put in a switch function so that it can switch to the English word and redirect it properly. The issue is I can't put the skill or year argument because there wouldn't be one. What can I put instead? A space? Is there another type of argument I'm supposed to use? --w126jep (talk) 22:57, 6 July 2015 (EDT)
- You need to specify the default case. In a switch statement, the cases look like a=b, which means, "in the case that the variable we're switching on is a, output b as the text." If you omit the a= part, that means, "in the case of none-of-the-above, output b". The default case will catch unspecified variables as well as mis-specified ones. --Jomegat (talk) 23:04, 6 July 2015 (EDT)
More changes
I've made two more changes to the English version of this template that we'll probably want to make here too. First, I've changed the table-of-contents/requirements to not be collapsed by default. That was done yesterday. I think we'll want to leave it that way until we can get the requirements pages integrated in. Second, I disabled the autonumbering this evening so the TOC doesn't get the section numbering added twice. --Jomegat (talk) 22:36, 8 October 2020 (EDT)