Changeset 4430
- Timestamp:
- 11/27/2016 10:57:20 PM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams
- Files:
-
- 5 edited
-
css/i18n-teams.css (modified) (12 diffs)
-
js/i18n-teams.js (modified) (1 diff)
-
views/all-locales.php (modified) (5 diffs)
-
views/locale-details.php (modified) (7 diffs)
-
wp-i18n-teams.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/css/i18n-teams.css
r4132 r4430 4 4 5 5 .i18n-label.latest { 6 color: #46 8847;6 color: #46b450; 7 7 } 8 8 .i18n-label.minor-behind { 9 color: # F7D708;9 color: #ffb900; 10 10 } 11 11 .i18n-label.major-behind-one { 12 color: # E6A45A;12 color: #f56e28; 13 13 } 14 14 .i18n-label.major-behind-many { 15 color: #e38587; 15 color: #dc3232; 16 } 17 18 .i18n-filter { 19 line-height: 2; 20 padding: 0 .25em; 16 21 } 17 22 18 23 .i18n-filter.current-filter { 19 24 color: #555; 20 border-bottom: 1px solid #555; 21 } 22 23 .translators-info thead th { 25 } 26 27 .translators-info table thead th { 24 28 vertical-align: top; 25 29 } 26 30 27 .translators-info thead small { 28 font-size: 9px; 31 .translators-info table thead small { 29 32 font-weight: normal; 30 33 } 31 34 32 .translators-info t body tr {35 .translators-info table tbody tr { 33 36 display: none; 34 37 } 35 38 36 .show-all t body tr,37 .translators-info.show-latest t body tr.latest,38 .translators-info.show-minor-behind t body tr.minor-behind,39 .translators-info.show-major-behind-one t body tr.major-behind-one,40 .translators-info.show-major-behind-many t body tr.major-behind-many,41 .translators-info.show-no-releases t body tr.no-releases,42 .translators-info.show-no-site t body tr.no-site,43 .translators-info.show-no-wp-project t body tr.no-wp-project,44 .translators-info.show-has-language-pack t body tr.has-language-pack,45 .translators-info.show-no-language-pack t body tr.no-language-pack,46 .translators-info.show-translated-100 t body tr.translated-100,47 .translators-info.show-translated-95 t body tr.translated-95,48 .translators-info.show-translated-90 t body tr.translated-90,49 .translators-info.show-translated-50-less t body tr.translated-50-less,50 .translators-info.show-translated-50 t body tr.translated-50 {39 .show-all table tbody tr, 40 .translators-info.show-latest table tbody tr.latest, 41 .translators-info.show-minor-behind table tbody tr.minor-behind, 42 .translators-info.show-major-behind-one table tbody tr.major-behind-one, 43 .translators-info.show-major-behind-many table tbody tr.major-behind-many, 44 .translators-info.show-no-releases table tbody tr.no-releases, 45 .translators-info.show-no-site table tbody tr.no-site, 46 .translators-info.show-no-wp-project table tbody tr.no-wp-project, 47 .translators-info.show-has-language-pack table tbody tr.has-language-pack, 48 .translators-info.show-no-language-pack table tbody tr.no-language-pack, 49 .translators-info.show-translated-100 table tbody tr.translated-100, 50 .translators-info.show-translated-95 table tbody tr.translated-95, 51 .translators-info.show-translated-90 table tbody tr.translated-90, 52 .translators-info.show-translated-50-less table tbody tr.translated-50-less, 53 .translators-info.show-translated-50 table tbody tr.translated-50 { 51 54 display: table-row; 52 55 } 53 56 54 57 .locale-version.latest { 55 background: # d2e7ca;58 background: #c7e8ca; 56 59 } 57 60 .locale-version.minor-behind { 58 background: #f ef0c1;61 background: #ffe399; 59 62 } 60 63 .locale-version.major-behind-one { 61 background: # E6A45A;64 background: #fbc5a9; 62 65 } 63 66 .locale-version.major-behind-many { 64 background: #e38587; 65 } 67 background: #f1adad; 68 } 69 66 70 td.right { 67 71 text-align: right; 68 72 } 73 74 td.center { 75 text-align: center; 76 } 77 69 78 td.no-left-border { 70 79 border-left: 0 !important; 71 80 } 81 72 82 td.no-right-border { 73 83 border-right: 0 !important; 74 84 } 75 .translators-info th, 76 .translators-info td.nowrap { 85 86 .translators-info table th, 87 .translators-info table td.nowrap { 77 88 white-space: nowrap; 78 89 } … … 113 124 font-size: 1.1em; 114 125 color: white; 126 text-decoration: none; 115 127 } 116 128 #locale-details, … … 142 154 } 143 155 156 .validators li .profile { 157 margin: 6px 0 2px; 158 font-size: 16px; 159 font-weight: 400; 160 line-height: 2em; 161 text-decoration: none; 162 } 163 164 .validators li .avatar { 165 float: left; 166 margin: 0 10px 10px 0; 167 padding: 1px; 168 width: 60px; 169 height: 60px; 170 } 171 172 .validators .user-slack { 173 display: block; 174 } 175 144 176 .validators.project-validators li { 145 177 width: 25%; … … 147 179 } 148 180 181 .validators.project-validators li .profile { 182 font-size: 13px; 183 line-height: 1.5em; 184 } 185 186 .validators.project-validators li .avatar { 187 float: left; 188 width: 40px; 189 height: 40px; 190 } 191 192 .validators.project-validators li .user-slack { 193 font-size: 10px; 194 } 195 149 196 @media only screen and (max-width: 850px) { 150 197 .validators li { … … 157 204 } 158 205 159 @media only screen and (max-width: 470px) {206 @media only screen and (max-width: 600px) { 160 207 .validators li { 161 208 width: 100%; … … 166 213 } 167 214 168 .validators.project-validators img.avatar { 169 margin-right: 5px !important; 170 } 171 .validators a { 172 text-decoration: none; 173 } 174 .validators .user-name { 175 font-size: 16px; 176 position: relative; 177 top: .2em; 178 } 179 .validators.project-validators .user-name { 180 font-size: 13px; 181 } 182 183 .validators .user-slack { 184 display: block; 185 margin-top: .2em; 186 } 187 188 .translators-info table { 215 @media only screen and (max-width: 400px) { 216 .validators.project-validators li { 217 width: 100%; 218 } 219 } 220 221 article.page .translators-info table { 189 222 width: 100%; 190 margin: .7em 0 1.5em; 191 border: 1px solid #ccc; 223 border: 1px solid #f1f1f1; 192 224 border-width: 1px 1px 1px 0; 193 border-spacing: 0; 194 } 195 .translators-info th { 196 background: #ccc; 197 border: 1px solid #ccc; 225 } 226 227 article.page .translators-info table tr th { 228 background: #f7f7f7; 229 border: 1px solid #f1f1f1; 230 border-width: 0 0 0 1px; 231 } 232 233 article.page .translators-info table tr td { 234 border: 1px solid #f1f1f1; 198 235 border-width: 1px 0 0 1px; 199 padding: 6px 15px; 200 } 201 .translators-info td { 202 border: 1px solid #ccc; 203 border-width: 1px 0 0 1px; 204 padding: 6px 15px; 236 } 237 238 article.page .translators-info table tr th:first-child, 239 article.page .translators-info table tr td:first-child { 240 padding-left: 1em; 241 } 242 243 article.page .translators-info table tr th:last-child, 244 article.page .translators-info table tr td:last-child { 245 padding-right: 1em; 205 246 } 206 247 207 248 @media (max-width: 768px) { 208 .i18n-filter { 209 line-height: 2; 210 padding: 0 3px; 211 } 212 213 .show-all tbody tr, 214 .translators-info.show-latest tbody tr.latest, 215 .translators-info.show-minor-behind tbody tr.minor-behind, 216 .translators-info.show-major-behind-one tbody tr.major-behind-one, 217 .translators-info.show-major-behind-many tbody tr.major-behind-many, 218 .translators-info.show-no-releases tbody tr.no-releases, 219 .translators-info.show-no-site tbody tr.no-site, 220 .translators-info.show-no-wp-project tbody tr.no-wp-project, 221 .translators-info.show-has-language-pack tbody tr.has-language-pack, 222 .translators-info.show-no-language-pack tbody tr.no-language-pack, 223 .translators-info.show-translated-100 tbody tr.translated-100, 224 .translators-info.show-translated-95 tbody tr.translated-95, 225 .translators-info.show-translated-90 tbody tr.translated-90, 226 .translators-info.show-translated-50-less tbody tr.translated-50-less, 227 .translators-info.show-translated-50 tbody tr.translated-50 { 249 .show-all table tbody tr, 250 .translators-info.show-latest table tbody tr.latest, 251 .translators-info.show-minor-behind table tbody tr.minor-behind, 252 .translators-info.show-major-behind-one table tbody tr.major-behind-one, 253 .translators-info.show-major-behind-many table tbody tr.major-behind-many, 254 .translators-info.show-no-releases table tbody tr.no-releases, 255 .translators-info.show-no-site table tbody tr.no-site, 256 .translators-info.show-no-wp-project table tbody tr.no-wp-project, 257 .translators-info.show-has-language-pack table tbody tr.has-language-pack, 258 .translators-info.show-no-language-pack table tbody tr.no-language-pack, 259 .translators-info.show-translated-100 table tbody tr.translated-100, 260 .translators-info.show-translated-95 table tbody tr.translated-95, 261 .translators-info.show-translated-90 table tbody tr.translated-90, 262 .translators-info.show-translated-50-less table tbody tr.translated-50-less, 263 .translators-info.show-translated-50 table tbody tr.translated-50 { 228 264 display: block; 229 265 } … … 242 278 243 279 .translators-info table tr { 244 border: 1px solid # ccc!important;245 } 246 247 .translators-info table tbody th,248 .translators-info table tbody td {280 border: 1px solid #f1f1f1 !important; 281 } 282 283 article.page .translators-info table tbody th, 284 article.page .translators-info table tbody td { 249 285 display: block; 250 286 text-align: left; 251 287 } 252 288 253 .translators-info table tbody tr { 254 margin-top: 20px; 255 } 256 257 .translators-info table tbody td { 258 padding: 6px 10px; 289 article.page .translators-info table tbody tr { 290 margin-top: 2em; 291 } 292 293 article.page .translators-info table tbody td { 259 294 position: relative; 260 padding-left: 40%; 261 } 262 263 .translators-info table tbody td[data-column-title]:before { 295 padding: .5em .5em .5em 40%; 296 vertical-align: top; 297 } 298 299 article.page .translators-info table tbody td[data-column-title]:before { 264 300 content: attr(data-column-title); 265 301 position: absolute; … … 269 305 } 270 306 271 .translators-info table tbody td:nth-of-type(1) {307 article.page .translators-info table tbody td:nth-of-type(1) { 272 308 display: inline-block; 273 309 padding-left: 40%; … … 277 313 } 278 314 279 .translators-info table tbody td:nth-of-type(2) {315 article.page .translators-info table tbody td:nth-of-type(2) { 280 316 display: inline-block; 281 317 padding-left: 0; … … 284 320 } 285 321 286 .translators-info table tbody td:nth-of-type(3) {287 border-top: 1px solid # ccc!important;288 } 289 290 .translators-info table tbody td:nth-of-type(4) {322 article.page .translators-info table tbody td:nth-of-type(3) { 323 border-top: 1px solid #f1f1f1 !important; 324 } 325 326 article.page .translators-info table tbody td:nth-of-type(4) { 291 327 display: inline-block; 292 328 padding-left: 40%; … … 296 332 } 297 333 298 .translators-info table tbody td:nth-of-type(5) {334 article.page .translators-info table tbody td:nth-of-type(5) { 299 335 display: inline-block; 300 336 padding-left: 0; … … 303 339 } 304 340 305 .translators-info table tbody td:nth-of-type(6) {341 article.page .translators-info table tbody td:nth-of-type(6) { 306 342 display: inline-block; 307 343 padding-left: 40%; 308 344 width: 30%; 309 border-top: 1px solid # ccc!important;310 border-bottom: none !important; 311 } 312 313 .translators-info table tbody td:nth-of-type(7) {345 border-top: 1px solid #f1f1f1 !important; 346 border-bottom: none !important; 347 } 348 349 article.page .translators-info table tbody td:nth-of-type(7) { 314 350 display: inline-block; 315 351 padding-left: 0; 316 352 width: 23%; 317 border-top: 1px solid # ccc!important;318 border-bottom: none !important; 319 } 320 321 .translators-info table tbody td:nth-of-type(8) {322 border-top: 1px solid # ccc!important;353 border-top: 1px solid #f1f1f1 !important; 354 border-bottom: none !important; 355 } 356 357 article.page .translators-info table tbody td:nth-of-type(8) { 358 border-top: 1px solid #f1f1f1 !important; 323 359 border-bottom: none !important; 324 360 padding-right: 0; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/js/i18n-teams.js
r2478 r4430 3 3 4 4 $( function() { 5 $( '.locale-filters' ).on( 'click', '.i18n-filter', function() { 5 $( document.body ).on( 'click', '.i18n-filter', function( event ) { 6 event.preventDefault(); 6 7 $( '.current-filter' ).removeClass( 'current-filter' ); 7 8 $( '.translators-info' )[0].className = 'translators-info show-' + $( this ).data( 'filter' ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/all-locales.php
r4132 r4430 88 88 <td data-column-title="<?php esc_attr_e( 'WP Locale', 'wporg' ); ?>"><?php echo esc_html( $locale->wp_locale ); ?></td> 89 89 90 <td data-column-title="<?php esc_attr_e( 'Version', 'wporg' ); ?>" class=" rightno-right-border">90 <td data-column-title="<?php esc_attr_e( 'Version', 'wporg' ); ?>" class="center no-right-border"> 91 91 <?php 92 92 if ( $locale_data[ $locale->wp_locale ]['rosetta_site_url'] ) { … … 101 101 ?> 102 102 </td> 103 <td class=" no-left-border nowrap">103 <td class="center no-left-border nowrap"> 104 104 <?php 105 105 if ( isset( $language_packs_data[ $locale->wp_locale ] ) ) { … … 113 113 </td> 114 114 115 <td data-column-title="<?php esc_attr_e( 'GlotPress', 'wporg' ); ?>" class=" rightno-right-border">115 <td data-column-title="<?php esc_attr_e( 'GlotPress', 'wporg' ); ?>" class="center no-right-border"> 116 116 <?php if ( isset( $percentages[ $locale->wp_locale ] ) ) : ?> 117 117 <a href="https://translate.wordpress.org/locale/<?php echo $locale->slug; ?>/default/wp/dev"> … … 122 122 <?php endif; ?> 123 123 </td> 124 <td class=" no-left-border nowrap">124 <td class="center no-left-border nowrap"> 125 125 <a href="https://translate.wordpress.org/locale/<?php echo $locale->slug; ?>"> 126 126 <?php echo $locale->slug; ?> … … 130 130 <td> 131 131 <a href="<?php echo esc_url( add_query_arg( 'locale', $locale->wp_locale ) ); ?>"> 132 <?php _e( ' Team', 'wporg' ); ?>132 <?php _e( 'View Team Page', 'wporg' ); ?> 133 133 </a> 134 134 </td> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/locale-details.php
r2200 r4430 19 19 </li> 20 20 <li> 21 <strong><?php _e( 'Team site:', 'wporg' ); ?></strong> 22 <?php if ( $locale_data['team_url'] ) : ?> 23 <a href="<?php echo esc_url( $locale_data['team_url'] ); ?>"><?php 24 $url = parse_url( $locale_data['team_url'] ); 25 printf( '%s%s', $url['host'], $url['path'] ); 26 ?></a> 27 <?php else : ?> 28 — 29 <?php endif; ?> 30 </li> 31 <li> 32 <strong><?php _e( 'Forums:', 'wporg' ); ?></strong> 33 <?php if ( $locale_data['forums_url'] ) : ?> 34 <a href="<?php echo esc_url( $locale_data['forums_url'] ); ?>"><?php 35 $url = parse_url( $locale_data['forums_url'] ); 36 printf( '%s%s', $url['host'], $url['path'] ); 37 ?></a> 38 <?php else : ?> 39 — 40 <?php endif; ?> 41 </li> 42 <li> 21 43 <strong><?php _e( 'Latest release:', 'wporg' ); ?></strong> 22 44 <?php echo $locale_data['latest_release'] ? $locale_data['latest_release'] : '—'; ?> … … 29 51 <strong><?php _e( 'GlotPress Locale Code:', 'wporg' ); ?></strong> 30 52 <?php echo esc_html( $locale->slug ); ?> 53 </li> 54 <li> 55 <strong><?php _e( 'Translation Projects:', 'wporg' ); ?></strong> 56 <a href="https://translate.wordpress.org/locale/<?php echo $locale->slug; ?>">translate.wordpress.org/locale/<?php echo $locale->slug; ?></a> 31 57 </li> 32 58 </ul> … … 55 81 56 82 57 <h2><?php _e( 'General Translation Editors', 'wporg'); ?></h2>83 <h2><?php printf( __( 'General Translation Editors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['validators'] ) ) ); ?></h2> 58 84 59 85 <?php if ( empty( $locale_data['validators'] ) ) : ?> … … 64 90 ?> 65 91 <li> 66 <a class="user-avatar" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 67 echo get_avatar( $validator['email'], 50 ); 68 ?></a> 69 <a class="user-name" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 92 <a class="profile" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 93 echo get_avatar( $validator['email'], 60 ); 70 94 echo esc_html( $validator['display_name'] ); 71 95 ?></a> … … 82 106 83 107 <?php if ( ! empty( $locale_data['project_validators'] ) ) : ?> 84 <h2><?php _e( 'Project Translation Editors', 'wporg'); ?></h2>108 <h2><?php printf( __( 'Project Translation Editors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['project_validators'] ) ) ); ?></h2> 85 109 86 110 <ul class="validators project-validators"> … … 88 112 ?> 89 113 <li> 90 <a class="user-avatar" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 91 echo get_avatar( $validator['email'], 25 ); 92 ?></a> 93 <a class="user-name" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 114 <a class="profile" href="https://profiles.wordpress.org/<?php echo esc_attr( $validator['nice_name'] ); ?>"><?php 115 echo get_avatar( $validator['email'], 40 ); 94 116 echo esc_html( $validator['display_name'] ); 95 117 ?></a> 118 <?php 119 if ( $validator['slack'] ) { 120 printf( '<span class="user-slack">@%s on <a href="%s">Slack</a></span>', $validator['slack'], 'https://make.wordpress.org/chat/' ); 121 } 122 ?> 96 123 </li> 97 124 <?php endforeach; ?> … … 99 126 <?php endif; ?> 100 127 101 102 <h2><?php _e( 'Translation Contributors', 'wporg' ); ?></h2> 128 <h2><?php printf( __( 'All Translation Contributors (%s)', 'wporg' ), number_format_i18n( count( $locale_data['translators'] ) ) ); ?></h2> 103 129 104 130 <?php if ( empty( $locale_data['translators'] ) ) : ?> -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/wp-i18n-teams.php
r4429 r4430 190 190 $statuses[ $language_pack_status ]++; 191 191 192 $forums_url = $team_url = ''; 193 if ( $subdomain ) { 194 $result = get_sites( array( 195 'domain' => $subdomain . '.wordpress.org', 196 'path__in' => array( '/support/', '/forums/' ), 197 'number' => 1, 198 ) ); 199 $site = array_shift( $result ); 200 if ( $site ) { 201 $forums_url = get_home_url( $site->id, '/' ); 202 } 203 204 $result = get_sites( array( 205 'domain' => $subdomain . '.wordpress.org', 206 'path__in' => array( '/team/' ), 207 'number' => 1, 208 ) ); 209 $site = array_shift( $result ); 210 if ( $site ) { 211 $team_url = get_home_url( $site->id, '/' ); 212 } 213 } 214 192 215 $locale_data[ $locale->wp_locale ] = array( 193 216 'release_status' => $release_status, … … 195 218 'language_pack_status' => $language_pack_status, 196 219 'rosetta_site_url' => $subdomain ? 'https://' . $subdomain . '.wordpress.org' : false, 220 'forums_url' => $forums_url ? $forums_url : false, 221 'team_url' => $team_url ? $team_url : false, 197 222 'latest_release' => $latest_release ? $latest_release : false, 198 223 ); … … 388 413 'email' => $user->user_email, 389 414 'nice_name' => $user->user_nicename, 415 'slack' => self::get_slack_username( $user->ID ), 390 416 ); 391 417 } else { … … 394 420 'email' => $user->user_email, 395 421 'nice_name' => $user->user_nicename, 422 'slack' => self::get_slack_username( $user->ID ), 396 423 ); 397 424 }
Note: See TracChangeset
for help on using the changeset viewer.