Source:
<code>private void itemSelected(int itemId) { switch (itemId) { case R.id.nav_albums: break; case R.id.nav_manage_accounts: startActivity(new Intent(getApplicationContext(), ManageAccountsActivity.class)); break; case R.id.nav_create_album: AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this, R.style.Theme_Piwigo_AlertDialog); <START> builder.setTitle("Create album"); <END> final AppCompatEditText input = new AppCompatEditText(MainActivity.this); input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); builder.setPositiveButton("OK", (dialog, which) -> createAlbum(input.getText().toString())); builder.setNegativeButton("Cancel", (dialog, which) -> dialog.cancel()); builder.show(); break; case R.id.nav_upload: if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_EXTERNAL_STORAGE)) { Toast.makeText(this,R.string.storage_permission_explaination, Toast.LENGTH_LONG).show(); } else { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE); } } else { selectPhoto(); } break; case R.id.nav_about: startActivity(new Intent(getApplicationContext(), AboutActivity.class)); break; case R.id.nav_privacy: startActivity(new Intent(getApplicationContext(), PrivacyPolicyActivity.class)); break; default: Toast.makeText(this,"not yet implemented",Toast.LENGTH_LONG).show(); break; } }</code><technical_language>localization..</technical_language>

Target:
private void itemSelected(int itemId) { switch (itemId) { case R.id.nav_albums: break; case R.id.nav_manage_accounts: startActivity(new Intent(getApplicationContext(), ManageAccountsActivity.class)); break; case R.id.nav_create_album: AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this, R.style.Theme_Piwigo_AlertDialog); builder.setTitle(R.string.create_album_title); final AppCompatEditText input = new AppCompatEditText(MainActivity.this); input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); builder.setPositiveButton(R.string.button_ok, (dialog, which) -> createAlbum(input.getText().toString())); builder.setNegativeButton(R.string.button_cancel, (dialog, which) -> dialog.cancel()); builder.show(); break; case R.id.nav_upload: if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_EXTERNAL_STORAGE)) { Toast.makeText(this,R.string.storage_permission_explaination, Toast.LENGTH_LONG).show(); } else { ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE); } } else { selectPhoto(); } break; case R.id.nav_about: startActivity(new Intent(getApplicationContext(), AboutActivity.class)); break; case R.id.nav_privacy: startActivity(new Intent(getApplicationContext(), PrivacyPolicyActivity.class)); break; default: Toast.makeText(this,"not yet implemented",Toast.LENGTH_LONG).show(); break; } }