[wp-meta] [Making WordPress.org] #3935: Language specific screenshots

Making WordPress.org noreply at wordpress.org
Thu Apr 18 02:07:39 UTC 2019

#3935: Language specific screenshots
 Reporter:  f.staude          |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:
Component:  Plugin Directory  |  Resolution:
 Keywords:  has-patch         |

Comment (by dd32):

 Hey @ck3lee,

 Just looking at [attachment:"3935.2.diff"]
  - The regex looks correct to me, although I haven't tested it yet
  - Even with the above, it looks like we're only using the first two
 digits of the locale? `substr( $image['locale'], 0, 2 )`

 Consider this line up of files:
  1. `screenshot-1.png`
  2. `screenshot-1-de_DE.png`
  3. `screenshot-1-de_CH.png`

 If the array of results was ordered exactly like that, you'd only had
 `screenshot-1.png` being used, if it was ordered 2,3,1 then for `de_CH`
 it'd only use the `de_DE` file.

 I think the list of images needs to be reduced before the loop:
 Do any images have a locale?
 If so, Is our locale there? Or is a nearish locale there? (ie. look for
 de_CH, then de)

 You should also consider this set of files, which is potentially likely:
  1. `screenshot-1.png`
  2. `screenshot-1-de_DE.png`
  3. `screenshot-2.png`
  4. `screenshot-2-de_CH.png`
  5. `screenshot-3.png`

Ticket URL: <https://meta.trac.wordpress.org/ticket/3935#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list