mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-21 18:42:35 +01:00
use format strings now
This commit is contained in:
parent
b8a27adb93
commit
cb4b20af45
@ -57,12 +57,12 @@ public class VideoInfoItemViewCreator {
|
||||
}
|
||||
holder.itemVideoTitleView.setText(info.title);
|
||||
holder.itemUploaderView.setText(info.uploader);
|
||||
holder.itemDurationView.setText(""+info.duration);
|
||||
holder.itemDurationView.setText(info.duration);
|
||||
if(!info.upload_date.isEmpty()) {
|
||||
holder.itemUploadDateView.setText(info.upload_date);
|
||||
} else {
|
||||
//tweak if necessary: This is a hack to prevent having white space in the layout :P
|
||||
holder.itemUploadDateView.setText(""+info.view_count);
|
||||
holder.itemUploadDateView.setText(String.format("%d", info.view_count));
|
||||
}
|
||||
|
||||
return convertView;
|
||||
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Bundle;
|
||||
@ -197,6 +198,7 @@ public class VideoItemDetailFragment extends Fragment {
|
||||
|
||||
public void updateInfo(VideoInfo info) {
|
||||
currentVideoInfo = info;
|
||||
Resources res = activity.getResources();
|
||||
try {
|
||||
VideoInfoItemViewCreator videoItemViewCreator =
|
||||
new VideoInfoItemViewCreator(LayoutInflater.from(getActivity()));
|
||||
@ -235,8 +237,11 @@ public class VideoItemDetailFragment extends Fragment {
|
||||
Locale locale = getPreferredLocale();
|
||||
NumberFormat nf = NumberFormat.getInstance(locale);
|
||||
String localisedViewCount = nf.format(info.view_count);
|
||||
viewCountView.setText(localisedViewCount
|
||||
+ " " + activity.getString(R.string.viewSufix));
|
||||
viewCountView.setText(
|
||||
String.format(
|
||||
res.getString(R.string.viewCountText), localisedViewCount));
|
||||
/*viewCountView.setText(localisedViewCount
|
||||
+ " " + activity.getString(R.string.viewSufix)); */
|
||||
|
||||
|
||||
thumbsUpView.setText(nf.format(info.like_count));
|
||||
@ -255,7 +260,7 @@ public class VideoItemDetailFragment extends Fragment {
|
||||
|
||||
String localisedDate = df.format(datum);
|
||||
uploadDateView.setText(
|
||||
activity.getString(R.string.uploadDatePrefix) + " " + localisedDate);
|
||||
String.format(res.getString(R.string.uploadDateText), localisedDate));
|
||||
descriptionView.setText(Html.fromHtml(info.description));
|
||||
descriptionView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">Aufrufe</string>
|
||||
<string name="uploadDatePrefix">Hochgeladen am </string>
|
||||
<string name="viewCountText">%1$s Aufrufe</string>
|
||||
<string name="uploadDateText">Hochgeladen am %1$s</string>
|
||||
<string name="noPlayerFound">Keinen Streamplayer gefunden. Vielleicht möchtest du einen installieren.</string>
|
||||
<string name="installStreamPlayer">Jetzt installieren</string>
|
||||
<string name="cancel">Abbrechen</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">visitas</string>
|
||||
<string name="uploadDatePrefix">Subido el </string>
|
||||
<string name="viewCountText">%1$s visitas</string>
|
||||
<string name="uploadDateText">Subido el %1$s</string>
|
||||
<string name="noPlayerFound">No se ha encontrado ningún reproductor de vídeo. Quizás quieras instalar alguno.</string>
|
||||
<string name="installStreamPlayer">Instalarlo</string>
|
||||
<string name="cancel">Cancelar</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">نماها</string>
|
||||
<string name="uploadDatePrefix">بارگذاریشده در: </string>
|
||||
<string name="viewCountText">%1$s نماها</string>
|
||||
<string name="uploadDateText">بارگذاریشده در: %1$s</string>
|
||||
<string name="noPlayerFound">هیچ پخشکنندهی جریانی یافت نشد. ممکن است بخواهید یکی نصب کنید.</string>
|
||||
<string name="installStreamPlayer">نصب کنید</string>
|
||||
<string name="cancel">انصراف</string>
|
||||
|
@ -29,10 +29,10 @@
|
||||
<string name="showPlayWithKodiTitle">Afficher l\'option \"Lire avec Kodi\"</string>
|
||||
<string name="title_activity_settings">Paramètres</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="uploadDatePrefix">Mise en ligne le </string>
|
||||
<string name="uploadDateText">Mise en ligne le %1$s</string>
|
||||
<string name="useExternalPlayerTitle">Utiliser un lecteur externe</string>
|
||||
<string name="viewSufix">vues</string>
|
||||
<string name="leftPlayButtonTitle">Afficher le bouton de lecture sur la gauche.</string>
|
||||
<string name="viewCountText">%1$s vues</string>
|
||||
<string name="leftPlayButtonTitle">Afficher le bouton de lecture sur la gauche.</string>
|
||||
<string name="playAudio">Audio</string>
|
||||
<string name="defaultAudioFormatTitle">Format audio par défaut</string>
|
||||
<string name="webMAudioDescription">WebM- format libre</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">megtekintés</string>
|
||||
<string name="uploadDatePrefix">Feltöltve: </string>
|
||||
<string name="viewCountText">%1$s megtekintés</string>
|
||||
<string name="uploadDateText">Feltöltve: %1$s</string>
|
||||
<string name="noPlayerFound">Nem található lejátszó. Telepítsen egyet!</string>
|
||||
<string name="installStreamPlayer">Telepítsen egyet</string>
|
||||
<string name="cancel">Mégse</string>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources><string name="app_name">ニューパイプ</string>
|
||||
<string name="title_videoitem_detail">ニューパイプ</string>
|
||||
<string name="viewSufix">表示</string>
|
||||
<string name="uploadDatePrefix">"アップロード: "</string>
|
||||
<string name="viewCountText">%1$s 表示</string>
|
||||
<string name="uploadDateText">"アップロード: "%1$s</string>
|
||||
<string name="noPlayerFound">StreamPlayer が見つかりませんでした。インストールが必要になるかもしれません.</string>
|
||||
<string name="installStreamPlayer">インストール</string>
|
||||
<string name="cancel">キャンセル</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">keer bekeken</string>
|
||||
<string name="uploadDatePrefix">Geüpload op </string>
|
||||
<string name="viewCountText">%1$s keer bekeken</string>
|
||||
<string name="uploadDateText">Geüpload op %1$s</string>
|
||||
<string name="noPlayerFound">Geen speler met streaming ondersteuning gevonden. Misschien wil je er een installeren.</string>
|
||||
<string name="installStreamPlayer">Installeer speler</string>
|
||||
<string name="cancel">Annuleer</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">просмотров</string>
|
||||
<string name="uploadDatePrefix">Опубликовано: </string>
|
||||
<string name="viewCountText">%1$s просмотров</string>
|
||||
<string name="uploadDateText">Опубликовано: %1$s</string>
|
||||
<string name="noPlayerFound">Ни одного потокового проигрывателя не было найдено. Установить?</string>
|
||||
<string name="installStreamPlayer">Установить</string>
|
||||
<string name="cancel">Отмена</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">Јутјуб цев</string>
|
||||
<string name="title_videoitem_detail">Јутјуб цев</string>
|
||||
<string name="viewSufix">приказа</string>
|
||||
<string name="uploadDatePrefix">"Отпремљен "</string>
|
||||
<string name="viewCountText">%1$s приказа</string>
|
||||
<string name="uploadDateText">"Отпремљен "%1$s</string>
|
||||
<string name="noPlayerFound">Нема плејера токова. Можда желите да га инсталирате.</string>
|
||||
<string name="installStreamPlayer">Инсталирај</string>
|
||||
<string name="cancel">Одустани</string>
|
||||
|
@ -2,8 +2,8 @@
|
||||
<resources>
|
||||
<string name="app_name">NewPipe</string>
|
||||
<string name="title_videoitem_detail">NewPipe</string>
|
||||
<string name="viewSufix">views</string>
|
||||
<string name="uploadDatePrefix">Uploaded on </string>
|
||||
<string name="viewCountText">%1$s views</string>
|
||||
<string name="uploadDateText">Uploaded on %1$s</string>
|
||||
<string name="noPlayerFound">No stream player found. You may want to install one.</string>
|
||||
<string name="installStreamPlayer">Install</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
|
Loading…
Reference in New Issue
Block a user